Skip to content

Commit 980e9cd

Browse files
committed
feat: update ESLint configuration
1 parent 8c6edd1 commit 980e9cd

File tree

10 files changed

+398
-374
lines changed

10 files changed

+398
-374
lines changed

.eslintrc.json

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

eslint.config.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// @ts-check
2+
const eslint = require('@eslint/js');
3+
const tseslint = require('typescript-eslint');
4+
const angular = require('angular-eslint');
5+
6+
module.exports = tseslint.config(
7+
{
8+
files: ['**/*.ts'],
9+
extends: [eslint.configs.recommended, ...tseslint.configs.recommended, ...tseslint.configs.stylistic, ...angular.configs.tsRecommended],
10+
processor: angular.processInlineTemplates,
11+
rules: {
12+
'id-blacklist': ['off'],
13+
'@typescript-eslint/ban-ts-comment': ['off'],
14+
'@typescript-eslint/no-explicit-any': ['off'],
15+
'no-unsafe-optional-chaining': ['off'],
16+
'@typescript-eslint/no-unused-vars': ['off'],
17+
'no-mixed-spaces-and-tabs': ['off'],
18+
'@typescript-eslint/naming-convention': [
19+
'error',
20+
{
21+
selector: ['enumMember'],
22+
format: ['UPPER_CASE'],
23+
},
24+
],
25+
'@angular-eslint/component-selector': 'off',
26+
'@angular-eslint/directive-selector': 'off',
27+
'@angular-eslint/no-input-rename': 'off',
28+
'max-len': [
29+
'error',
30+
{
31+
code: 400,
32+
},
33+
],
34+
'no-shadow': 'off',
35+
'@typescript-eslint/no-shadow': ['error'],
36+
'@typescript-eslint/explicit-function-return-type': ['off'],
37+
curly: ['error', 'all'],
38+
},
39+
},
40+
{
41+
files: ['**/*.html'],
42+
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
43+
rules: {
44+
'@angular-eslint/template/label-has-associated-control': ['off'],
45+
'@angular-eslint/template/interactive-supports-focus': ['off'],
46+
'@angular-eslint/template/elements-content': ['off'],
47+
'@angular-eslint/template/click-events-have-key-events': ['off'],
48+
},
49+
},
50+
);

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,9 @@
5151
"@angular-devkit/build-angular": "^19.2.0",
5252
"@angular-devkit/core": "^19.2.0",
5353
"@angular-devkit/schematics": "^19.2.0",
54-
"@angular-eslint/builder": "19.2.0",
55-
"@angular-eslint/eslint-plugin": "19.2.0",
56-
"@angular-eslint/eslint-plugin-template": "19.2.0",
57-
"@angular-eslint/schematics": "19.2.0",
58-
"@angular-eslint/template-parser": "19.2.0",
5954
"@angular/cli": "^19.2.0",
6055
"@angular/compiler-cli": "^19.2.0",
56+
"@eslint/js": "^9.27.0",
6157
"@playwright/test": "^1.49.1",
6258
"@schematics/angular": "^19.1.1",
6359
"@semantic-release/exec": "^6.0.3",
@@ -66,11 +62,12 @@
6662
"@sonar/scan": "^4.3.0",
6763
"@types/jasmine": "^5.1.7",
6864
"@types/node": "^22.10.7",
69-
"eslint-import-resolver-typescript": "^4.3.5",
7065
"@typescript-eslint/eslint-plugin": "^8.20.0",
7166
"@typescript-eslint/parser": "^8.20.0",
72-
"eslint": "^9.18.0",
67+
"angular-eslint": "19.4.0",
68+
"eslint": "^9.27.0",
7369
"eslint-config-prettier": "^10.0.1",
70+
"eslint-import-resolver-typescript": "^4.3.5",
7471
"eslint-plugin-import": "^2.31.0",
7572
"eslint-plugin-jsdoc": "^50.6.1",
7673
"eslint-plugin-prefer-arrow": "^1.2.3",
@@ -83,6 +80,7 @@
8380
"ng-packagr": "^19.1.0",
8481
"prettier": "^3.4.2",
8582
"semantic-release": "^24.2.1",
86-
"typescript": "~5.7.3"
83+
"typescript": "~5.7.3",
84+
"typescript-eslint": "8.32.0"
8785
}
8886
}

0 commit comments

Comments
 (0)