Skip to content

Commit 6759f9d

Browse files
chore: integrate eslint properly
- Use ESLint in CI - Upgrade to Flat Configuration - Fix Codebase of all linting errors and warnings - Use unused imports plugin
1 parent 898af7f commit 6759f9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+943
-947
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
node-version: '18'
2020
cache: "pnpm"
2121
- run: pnpm install --frozen-lockfile
22+
- run: pnpm run lint:all
2223
- run: pnpm run test:all
2324
- run: pnpm run build:all
2425
- run: ./integration-tests.sh

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
pnpm lint-staged
2+
pnpm verify:all

apps/demo-e2e/.eslintrc.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

apps/demo-e2e/playwright.config.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

apps/demo-e2e/project.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

apps/demo-e2e/src/example.spec.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

apps/demo/.eslintrc.json

Lines changed: 0 additions & 37 deletions
This file was deleted.

apps/demo/eslint.config.cjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const nx = require('@nx/eslint-plugin');
2+
const baseConfig = require('../../eslint.config.cjs');
3+
4+
module.exports = [
5+
...baseConfig,
6+
...nx.configs['flat/angular'],
7+
...nx.configs['flat/angular-template'],
8+
{
9+
files: ['**/*.ts'],
10+
rules: {
11+
'@angular-eslint/directive-selector': [
12+
'error',
13+
{
14+
type: 'attribute',
15+
prefix: 'demo',
16+
style: 'camelCase',
17+
},
18+
],
19+
'@angular-eslint/component-selector': [
20+
'error',
21+
{
22+
type: 'element',
23+
prefix: 'demo',
24+
style: 'kebab-case',
25+
},
26+
],
27+
},
28+
}
29+
];

0 commit comments

Comments
 (0)