Skip to content

Commit 2d9c112

Browse files
committed
chore: update to ESLint v9 with flat config
1 parent 736c595 commit 2d9c112

File tree

6 files changed

+1399
-1915
lines changed

6 files changed

+1399
-1915
lines changed

.eslintrc.json

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

eslint.config.mjs

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import tseslint from "typescript-eslint";
2+
import angularEslint from "angular-eslint";
3+
4+
export default tseslint.config(
5+
{
6+
files: ["**/*.ts"],
7+
extends: [
8+
...tseslint.configs.strictTypeChecked,
9+
...tseslint.configs.stylisticTypeChecked,
10+
...angularEslint.configs.tsRecommended,
11+
],
12+
processor: angularEslint.processInlineTemplates,
13+
languageOptions: {
14+
parserOptions: {
15+
project: true,
16+
},
17+
},
18+
rules: {
19+
"@typescript-eslint/restrict-template-expressions": "off",
20+
"@typescript-eslint/restrict-plus-operands": "off",
21+
"@angular-eslint/component-selector": [
22+
"error",
23+
{
24+
prefix: "app",
25+
style: "kebab-case",
26+
type: "element",
27+
},
28+
],
29+
"@angular-eslint/directive-selector": [
30+
"error",
31+
{
32+
prefix: "app",
33+
style: "camelCase",
34+
type: "attribute",
35+
},
36+
],
37+
},
38+
},
39+
{
40+
files: ["**/*.spec.ts"],
41+
rules: {
42+
"@typescript-eslint/dot-notation": "off",
43+
},
44+
},
45+
{
46+
files: ["**/*.html"],
47+
extends: [
48+
...angularEslint.configs.templateRecommended,
49+
...angularEslint.configs.templateAccessibility,
50+
],
51+
rules: {
52+
"@angular-eslint/template/no-call-expression": "error",
53+
"@angular-eslint/template/no-duplicate-attributes": "error",
54+
"@angular-eslint/template/no-interpolation-in-attributes": "error",
55+
"@angular-eslint/template/use-track-by-function": "error",
56+
"@angular-eslint/template/prefer-self-closing-tags": "error",
57+
},
58+
},
59+
);

0 commit comments

Comments
 (0)