Skip to content

Commit 05c09ed

Browse files
authored
chore: 🤖 upgrade to eslint v9 (ngneat#705)
upgrade to eslint v9 with flat config
1 parent be6f2a8 commit 05c09ed

File tree

6 files changed

+428
-354
lines changed

6 files changed

+428
-354
lines changed

.eslintignore

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

.eslintrc.json

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

eslint.config.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { defineConfig, globalIgnores } from 'eslint/config';
2+
import angular from 'angular-eslint';
3+
4+
export default defineConfig([
5+
globalIgnores([
6+
'projects/spectator/test/**/*.ts',
7+
'projects/spectator/jest/test/**/*.ts',
8+
'projects/spectator/vitest/test/**/*.ts',
9+
'projects/spectator/schematics/**/*.*',
10+
]),
11+
{
12+
files: ['**/*.ts'],
13+
processor: angular.processInlineTemplates,
14+
extends: [angular.configs.tsRecommended],
15+
languageOptions: {
16+
ecmaVersion: 5,
17+
sourceType: 'script',
18+
19+
parserOptions: {
20+
project: ['tsconfig.json', 'e2e/tsconfig.json'],
21+
createDefaultProgram: true,
22+
},
23+
},
24+
rules: {
25+
'no-console': ['error'],
26+
'@angular-eslint/component-selector': [
27+
'error',
28+
{
29+
prefix: 'lib',
30+
style: 'kebab-case',
31+
type: 'element',
32+
},
33+
],
34+
'@angular-eslint/directive-selector': [
35+
'error',
36+
{
37+
prefix: 'lib',
38+
style: 'camelCase',
39+
type: 'attribute',
40+
},
41+
],
42+
},
43+
},
44+
{
45+
files: ['**/*.html'],
46+
extends: [angular.configs.templateRecommended],
47+
rules: {},
48+
},
49+
]);

package.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
"@angular-builders/jest": "^18.0.0",
3737
"@angular-devkit/build-angular": "^19.0.1",
3838
"@angular-devkit/schematics": "^19.0.1",
39-
"@angular-eslint/builder": "18.4.2",
40-
"@angular-eslint/eslint-plugin": "18.4.2",
41-
"@angular-eslint/eslint-plugin-template": "18.4.2",
42-
"@angular-eslint/schematics": "18.4.2",
43-
"@angular-eslint/template-parser": "18.4.2",
4439
"@angular/animations": "^19.0.0",
4540
"@angular/build": "^19.0.0",
4641
"@angular/cdk": "^19.0.0",
@@ -60,13 +55,14 @@
6055
"@types/jasmine": "5.1.4",
6156
"@types/jest": "29.5.11",
6257
"@types/node": "20.10.4",
63-
"@typescript-eslint/eslint-plugin": "^7.2.0",
64-
"@typescript-eslint/parser": "^7.2.0",
58+
"@typescript-eslint/eslint-plugin": "^8.33.1",
59+
"@typescript-eslint/parser": "^8.33.1",
6560
"all-contributors-cli": "^6.19.0",
61+
"angular-eslint": "^19.8.0",
6662
"core-js": "^3.9.1",
6763
"cross-env": "^5.1.4",
6864
"cz-conventional-changelog": "^3.3.0",
69-
"eslint": "^8.57.0",
65+
"eslint": "^9.28.0",
7066
"git-cz": "^4.7.6",
7167
"helpful-decorators": "^2.1.0",
7268
"husky": "^8.0.2",
@@ -88,6 +84,7 @@
8884
"ts-node": "10.1.0",
8985
"tslib": "^2.6.2",
9086
"typescript": "5.6.3",
87+
"typescript-eslint": "^8.33.1",
9188
"vite-tsconfig-paths": "^5.0.1",
9289
"vitest": "2.1.8",
9390
"zone.js": "0.15.0"

projects/spectator/src/lib/spectator-host/host-component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Component, NgModule } from '@angular/core';
33
@Component({
44
selector: 'lib-ngneat-host-component',
55
template: '',
6+
// eslint-disable-next-line @angular-eslint/prefer-standalone
67
standalone: false,
78
})
89
export class HostComponent {}

0 commit comments

Comments
 (0)