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