-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.json
158 lines (158 loc) · 5.67 KB
/
.eslintrc.json
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
{
"env": {
"es6": true
},
"root": true,
"ignorePatterns": [
"projects/**/*",
"zone-flags.ts",
"test.ts",
"main.ts",
"eslint-custom-rules/**/*"
],
"plugins": ["max-params-no-constructor", "custom-rules"],
"overrides": [
{
"files": ["*.ts"],
"excludedFiles": ["*.spec.ts", "*.e2e-spec.ts", "*.po.ts"],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"jsdoc/newline-after-description": "off",
"@angular-eslint/component-class-suffix": [
"error",
{
"suffixes": ["Page", "Component"]
}
],
"@typescript-eslint/naming-convention": [
"off",
{
"selector": "variable",
"format": ["camelCase"]
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app"
}
],
"indent": "off",
"semi": "error",
"no-underscore-dangle": "off",
"@angular-eslint/template/no-negated-async": "off",
"@typescript-eslint/prefer-for-of": "off",
"prefer-arrow/prefer-arrow-functions": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@angular-eslint/no-conflicting-lifecycle": "off",
"lines-between-class-members": ["error", "always"],
"@typescript-eslint/no-shadow": "off",
"complexity": [2, 10],
"max-depth": ["error", 4],
// "no-magic-numbers": "error",
"max-params-no-constructor/max-params-no-constructor": ["error", 4],
"max-len": "off",
"space-before-function-paren": "off",
"@typescript-eslint/quotes": "off",
"@typescript-eslint/no-unsafe-call": ["error"],
"@typescript-eslint/no-unsafe-member-access": ["error"],
"@typescript-eslint/no-unsafe-assignment": ["error"],
"@typescript-eslint/no-unsafe-return": ["error"],
"@typescript-eslint/no-unsafe-argument": ["error"],
"@typescript-eslint/explicit-function-return-type": ["error"],
"@typescript-eslint/no-unnecessary-type-assertion": ["error"],
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/no-explicit-any": ["error"],
"@typescript-eslint/no-empty-function": ["error"],
"@typescript-eslint/no-empty-interface": ["error"],
"@typescript-eslint/no-inferrable-types": ["error"],
"no-unused-expressions": ["error"],
"no-console": ["error", { "allow": [""] }],
"custom-rules/one-interface-per-file": "error",
"custom-rules/one-enum-per-file": "error",
"custom-rules/prefer-semantic-extension-name": "error"
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"@angular-eslint/template/no-negated-async": "off"
}
},
{
"files": ["*.data.ts"],
"rules": {
"custom-rules/prefer-deep-freeze": "error"
}
},
{
"files": ["*.spec.ts"],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat"
],
"rules": {
"jsdoc/newline-after-description": "off",
"@angular-eslint/component-class-suffix": "off",
"@typescript-eslint/naming-convention": "off",
"@angular-eslint/component-selector": "off",
"@angular-eslint/directive-selector": "off",
"indent": "off",
"semi": "off",
"no-underscore-dangle": "off",
"@angular-eslint/template/no-negated-async": "off",
"@typescript-eslint/prefer-for-of": "off",
"prefer-arrow/prefer-arrow-functions": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@angular-eslint/no-conflicting-lifecycle": "off",
"lines-between-class-members": "off",
"@typescript-eslint/no-shadow": "off",
"complexity": "off",
"max-depth": "off",
"max-params-no-constructor/max-params-no-constructor": "off",
"max-len": "off",
"space-before-function-paren": "off",
"@typescript-eslint/quotes": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-inferrable-types": "off",
"no-unused-expressions": "off",
"custom-rules/space-before-it-blocks": "error",
"custom-rules/prefer-jasmine-matchers": "error",
"custom-rules/prefer-resolve-to-reject-with": "error"
}
}
]
}