-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
214 lines (214 loc) · 6.92 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"plugins": [
"@stylistic",
"only-warn",
"jest"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:@angular-eslint/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"plugins": [
"@typescript-eslint"
],
"rules": {
"@stylistic/no-trailing-spaces": "warn",
"require-atomic-updates": "warn",
"no-await-in-loop": "warn",
"no-constructor-return": "warn",
"no-duplicate-imports": "warn",
"no-self-compare": "warn",
"no-unreachable-loop": "warn",
"consistent-this": ["warn", "this"],
"no-alert": "warn",
"no-caller": "warn",
"no-delete-var": "warn",
"eqeqeq": ["warn", "always"],
"@stylistic/no-extra-semi": "warn",
"@stylistic/no-floating-decimal": "warn",
"no-implicit-coercion": "warn",
"no-implied-eval": "warn",
"no-lone-blocks": "warn",
"no-lonely-if": "warn",
"no-loop-func": "warn",
"no-multi-assign": "warn",
"no-multi-str": "warn",
"no-new": "warn",
"no-new-func": "warn",
"no-new-wrappers": "warn",
"no-octal": "warn",
"no-octal-escape": "warn",
"no-proto": "warn",
"no-console": ["warn", { "allow": ["warn", "error"] }],
"no-return-assign": "warn",
"no-return-await": "warn",
"no-script-url": "warn",
"no-shadow-restricted-names": "warn",
"no-throw-literal": "warn",
"no-undef-init": "warn",
"no-unneeded-ternary": "warn",
"no-useless-catch": "warn",
"no-useless-computed-key": "warn",
"no-useless-concat": "warn",
"no-useless-escape": "warn",
"no-useless-rename": "warn",
"no-useless-return": "warn",
"no-with": "warn",
"prefer-numeric-literals": "warn",
"prefer-object-spread": "warn",
"prefer-spread": "warn",
"quote-props": ["warn", "consistent-as-needed"],
"@stylistic/quotes": ["error", "single"],
"radix": "warn",
"array-bracket-spacing": ["warn", "never"],
"arrow-spacing": ["warn", { "before": true, "after": true }],
"block-spacing": ["warn", "always"],
"brace-style": ["warn", "1tbs"],
"comma-spacing": ["warn", { "before": false, "after": true }],
"comma-style": ["warn", "last"],
"computed-property-spacing": ["warn", "never"],
"func-call-spacing": ["warn", "never"],
"key-spacing": ["warn", { "beforeColon": false }],
"keyword-spacing": ["warn", { "before": true }],
"@stylistic/no-multi-spaces": "warn",
"@stylistic/no-tabs": ["warn"],
"curly": "warn",
"padded-blocks": ["warn", "never"],
"rest-spread-spacing": ["warn", "never"],
"semi-spacing": ["warn", {"before": false, "after": true}],
"space-before-blocks": ["warn", "always"],
"@angular-eslint/component-selector": [
"warn",
{
"type": "element",
"prefix": "gpf",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"warn",
{
"type": "attribute",
"prefix": "gpf",
"style": "camelCase"
}
],
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/explicit-member-accessibility": [
"warn",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/no-explicit-any": "warn",
"@stylistic/dot-notation": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/no-extra-parens": ["warn", "all", { "nestedBinaryExpressions": false }],
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/member-ordering": "off",
"@stylistic/semi": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"indent": ["warn", 2, {"SwitchCase": 1}],
"@stylistic/max-len": [
"warn",
{
"code": 120
}
],
"no-duplicate-case": "warn",
"no-invalid-this": "warn",
"@stylistic/no-multiple-empty-lines": "warn",
"no-shadow": "warn",
"no-template-curly-in-string": "warn",
"no-unused-expressions": "warn",
"@stylistic/space-before-function-paren": [
"warn",
"never"
],
"@stylistic/space-in-parens": [
"warn",
"never"
],
"valid-typeof": "warn",
"yoda": "warn",
"object-shorthand": ["warn", "never"],
"@typescript-eslint/unbound-method": "off"
}
},
{
"files": ["*.html"],
"parser": "@angular-eslint/template-parser",
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
},
{
"files": ["*.html"],
"extends": ["plugin:prettier/recommended"],
"rules": {
"prettier/prettier": "warn"
}
},
{
"files": ["*.spec.ts"],
"plugins": ["jest"],
"extends": ["plugin:jest/recommended"],
"rules": {
"jest/consistent-test-it": 1,
"jest/expect-expect": 1,
"jest/max-nested-describe": 2,
"jest/no-conditional-expect": 1,
"jest/no-conditional-in-test": 1,
"jest/no-deprecated-functions": 1,
"jest/no-done-callback": 1,
"jest/no-duplicate-hooks": 1,
"jest/no-export": 1,
"jest/no-focused-tests": 1,
"jest/no-identical-title": 1,
"jest/no-interpolation-in-snapshots": 1,
"jest/no-jasmine-globals": 1,
"jest/no-large-snapshots": 1,
"jest/no-mocks-import": 1,
"jest/no-standalone-expect": 1,
"jest/no-test-return-statement": 1,
"jest/prefer-called-with": 1,
"jest/prefer-comparison-matcher": 1,
"jest/prefer-equality-matcher": 1,
"jest/prefer-expect-resolves": 1,
"jest/prefer-hooks-in-order": 1,
"jest/prefer-hooks-on-top": 1,
"jest/prefer-spy-on": 1,
"jest/prefer-strict-equal": 1,
"jest/prefer-to-be": 1,
"jest/prefer-to-contain": 1,
"jest/prefer-to-have-length": 1,
"jest/prefer-todo": 1,
"jest/require-to-throw-message": 1,
"jest/require-top-level-describe": 1,
"jest/valid-describe-callback": 1,
"jest/valid-expect": 1,
"jest/valid-expect-in-promise": 1,
"jest/valid-title": 1,
"jest/no-disabled-tests": 0
}
}
]
}