Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

119 changes: 0 additions & 119 deletions .eslintrc.json

This file was deleted.

43 changes: 20 additions & 23 deletions .github/workflows/pr_on_master.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
# File for Pull Request on master branch
name: PR on master

# When a PR is opened to master
on:
pull_request:
branches:
- master
branches: [master]
types: [opened, reopened, synchronize]

jobs:
build:
# Setup OS and Node Version
runs-on: ubuntu-latest

strategy:
matrix:
# Latest nodes only
node-version: [18.x]
# Define Steps

steps:
# Checkout code
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -30,20 +25,22 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'

# Make sure we have all branches
- name: Fetch other branches
run: git fetch --no-tags --prune --depth=5 origin master

- uses: nrwl/nx-set-shas@v4
- name: Set NX SHAs
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: 'master'

- name: Install environment
run: npm ci --include=dev
- name: Install dependencies
run: npm ci

- name: Lint affected projects
run: npx nx affected --target=lint --parallel=3

- name: Check formatting
run: npx nx format:check --base=origin/master --verbose

- name: Test affected projects
run: npx nx affected --target=test --parallel=3 --ci --code-coverage --verbose

- run: npx nx lint
- run: npx nx format:write --base="origin/master" --code-coverage --verbose
- run: npx nx format:check --base="origin/master" --code-coverage --verbose
- run: npx nx affected --target=lint --parallel=3
- run: npx nx affected --target=test --parallel=3 --ci --code-coverage --verbose
- run: npx nx affected --target=build --parallel=3
- name: Build affected projects
run: npx nx affected --target=build --parallel=3
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ Thumbs.db

# Nx Cache
.nx
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md

.cursor\rules\nx-rules.mdc
.github\instructions\nx.instructions.md

.github/instructions/
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@

package-lock.json

/.nx/workspace-data
/.nx/workspace-data
/.nx/cache
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"cSpell.words": [
"fontawesome",
"Pokedex",
"rbtechdev",
"Winboxes"
]
],
"nxConsole.generateAiAgentRules": true
}
10 changes: 0 additions & 10 deletions apps/winbox-example-app-e2e/.eslintrc.json

This file was deleted.

18 changes: 10 additions & 8 deletions apps/winbox-example-app-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
...nxE2EPreset(__dirname),
/**
* TODO(@nx/cypress): In Cypress v12,the testIsolation option is turned on by default.
* This can cause tests to start breaking where not indended.
* You should consider enabling this once you verify tests do not depend on each other
* More Info: https://docs.cypress.io/guides/references/migration-guide#Test-Isolation
**/
testIsolation: false,
...nxE2EPreset(__filename, {
cypressDir: 'src',
webServerCommands: {
default: 'npx nx run test-angular:serve',
production: 'npx nx run test-angular:serve-static',
},
ciWebServerCommand: 'npx nx run test-angular:serve-static',
ciBaseUrl: 'http://localhost:4200',
}),
baseUrl: 'http://localhost:4200',
},
});
37 changes: 37 additions & 0 deletions apps/winbox-example-app-e2e/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import path from 'path';
import baseConfig from '../../eslint.config.mjs';
import cypress from 'eslint-plugin-cypress/flat';
import tsParser from '@typescript-eslint/parser';

export default [
cypress.configs['recommended'],
...baseConfig,

// Ignora niente (opzionale)
{
ignores: ['!**/*', '**/commands.ts'],
},

// Override per file Cypress (E2E)
{
files: [
'**/*.cy.ts',
'**/*.cy.js',
'cypress/**/*.ts',
'cypress/**/*.js',
'apps/**/*-e2e/**/*.ts'
],
languageOptions: {
parser: tsParser,
parserOptions: {
project: [path.resolve(import.meta.dirname, './tsconfig.eslint.json')],
tsconfigRootDir: import.meta.dirname
},
},
rules: {
'cypress/no-assigning-return-values': 'error',
'cypress/no-unnecessary-waiting': 'warn',
'cypress/assertion-before-screenshot': 'warn',
},
}
];
2 changes: 1 addition & 1 deletion apps/winbox-example-app-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/winbox-example-app-e2e/**/*.{js,ts}"]
Expand Down
1 change: 0 additions & 1 deletion apps/winbox-example-app-e2e/src/e2e/app.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { getGreeting } from '../support/app.po';

describe('winbox-example-app', () => {
beforeEach(() => cy.visit('/'));

Expand Down
12 changes: 12 additions & 0 deletions apps/winbox-example-app-e2e/tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.js",
"src/**/*.jsx",
"cypress/**/*.ts",
"apps/**/*-e2e/**/*.ts",
"cypress.config.ts"
]
}
36 changes: 0 additions & 36 deletions apps/winbox-example-app/.eslintrc.json

This file was deleted.

Loading
Loading