-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.json
338 lines (338 loc) · 9.73 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"extraFileExtensions": [".mjs"],
"project": "./tsconfig.eslint.json",
"sourceType": "module",
"ecmaVersion": 2020,
"warnOnUnsupportedTypeScriptVersion": false
},
"extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
"env": {
"node": true,
"es6": true,
"es2017": true,
"es2020": true,
"jest": true,
"browser": true,
"commonjs": true
},
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"minimumDescriptionLength": 3,
"ts-check": true,
"ts-expect-error": "allow-with-description",
"ts-ignore": "allow-with-description",
"ts-nocheck": true
}
],
"@typescript-eslint/class-literal-property-style": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/dot-notation": [
"error",
{
"allowKeywords": true,
"allowPattern": "(^[A-Z])|(^[a-z]+(_[a-z]+)+$)",
"allowPrivateClassPropertyAccess": true
}
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"signature",
"public-instance-field",
"protected-instance-field",
"private-instance-field",
"instance-field",
"public-constructor",
"protected-constructor",
"private-constructor",
"constructor",
"public-instance-method",
"protected-instance-method",
"private-instance-method",
"instance-method",
"public-static-field",
"protected-static-field",
"private-static-field",
"static-field",
"public-static-method",
"protected-static-method",
"private-static-method",
"static-method"
]
}
],
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-duplicate-imports": [
"error",
{
"includeExports": false
}
],
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": ["error", { "allowWithDecorator": true }],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-invalid-this": "off",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/unified-signatures": "error",
"accessor-pairs": "off",
"array-callback-return": "error",
"block-scoped-var": "error",
"callback-return": "off",
"capitalized-comments": "off",
"class-methods-use-this": "off",
"complexity": "off",
"consistent-return": "off",
"consistent-this": ["error", "self"],
"constructor-super": "off",
"default-case": "off",
"dot-notation": "off",
"eqeqeq": ["error", "smart"],
"for-direction": "off",
"func-name-matching": ["warn", "always"],
"func-names": ["warn", "as-needed"],
"func-style": "off",
"global-require": "off",
"guard-for-in": "warn",
"handle-callback-err": "off",
"id-blacklist": "off",
"id-length": "off",
"id-match": "off",
"init-declarations": "off",
"line-comment-position": "off",
"lines-between-class-members": [
"error",
"always",
{
"exceptAfterSingleLine": true
}
],
"max-depth": "off",
"max-lines": "off",
"max-nested-callbacks": "off",
"max-params": "off",
"max-statements": "off",
"max-statements-per-line": [
"error",
{
"max": 1
}
],
"multiline-comment-style": "off",
"new-cap": "off",
"no-alert": "error",
"no-array-constructor": "off",
"no-await-in-loop": "off",
"no-bitwise": "off",
"no-buffer-constructor": "error",
"no-caller": "error",
"no-case-declarations": "error",
"no-catch-shadow": "error",
"no-class-assign": "warn",
"no-compare-neg-zero": "error",
"no-cond-assign": "warn",
"no-console": "off",
"no-const-assign": "error",
"no-constant-condition": "off",
"no-control-regex": "off",
"no-debugger": "error",
"no-delete-var": "error",
"no-div-regex": "off",
"no-dupe-args": "error",
"no-dupe-class-members": "off",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "off",
"no-else-return": "warn",
"no-empty": "off",
"no-empty-character-class": "error",
"no-empty-function": "off",
"no-empty-pattern": "off",
"no-eq-null": "warn",
"no-eval": "warn",
"no-ex-assign": "off",
"no-extend-native": "warn",
"no-extra-bind": "off",
"no-extra-boolean-cast": "off",
"no-extra-label": "warn",
"no-fallthrough": "off",
"no-func-assign": "off",
"no-global-assign": "off",
"no-implicit-coercion": "error",
"no-implicit-globals": "off",
"no-implied-eval": "off",
"no-import-assign": "warn",
"no-inline-comments": "off",
"no-inner-declarations": "off",
"no-invalid-regexp": "warn",
"no-invalid-this": "off",
"no-irregular-whitespace": [
"error",
{
"skipComments": true,
"skipRegExps": true,
"skipStrings": true,
"skipTemplates": true
}
],
"no-iterator": "off",
"no-label-var": "error",
"no-labels": "off",
"no-lone-blocks": "off",
"no-lonely-if": "error",
"no-loop-func": "off",
"no-magic-numbers": "off",
"no-mixed-requires": "error",
"no-multi-assign": "warn",
"no-multi-str": "error",
"no-negated-condition": "warn",
"no-nested-ternary": "off",
"no-new": "off",
"no-new-func": "warn",
"no-new-object": "error",
"no-new-require": "error",
"no-new-symbol": "warn",
"no-new-wrappers": "warn",
"no-obj-calls": "warn",
"no-octal": "error",
"no-octal-escape": "error",
"no-param-reassign": "off",
"no-path-concat": "warn",
"no-plusplus": "off",
"no-process-env": "off",
"no-process-exit": "off",
"no-proto": "off",
"no-prototype-builtins": "off",
"no-redeclare": "off",
"no-regex-spaces": "warn",
"no-restricted-globals": "off",
"no-restricted-imports": "off",
"no-restricted-modules": "off",
"no-restricted-properties": "off",
"no-restricted-syntax": "off",
"no-return-assign": "off",
"no-return-await": "warn",
"no-script-url": "off",
"no-self-assign": "error",
"no-self-compare": "warn",
"no-setter-return": "warn",
"no-shadow": "off",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "warn",
"no-sync": "off",
"no-template-curly-in-string": "error",
"no-ternary": "off",
"no-this-before-super": "error",
"no-throw-literal": "off",
"no-undef": "off",
"no-undef-init": "off",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-unmodified-loop-condition": "off",
"no-unneeded-ternary": "off",
"no-unreachable": "warn",
"no-unsafe-finally": "warn",
"no-unsafe-negation": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-unused-vars": "off",
"no-use-before-define": "off",
"no-useless-call": "off",
"no-useless-computed-key": "error",
"no-useless-concat": "warn",
"no-useless-constructor": "off",
"no-useless-escape": "off",
"no-useless-rename": "error",
"no-useless-return": "warn",
"no-var": "error",
"no-void": "off",
"no-warning-comments": "off",
"no-with": "error",
"object-shorthand": ["error", "always"],
"one-var": ["error", "never"],
"operator-assignment": ["error", "always"],
"padding-line-between-statements": "off",
"prefer-const": [
"error",
{
"destructuring": "all"
}
],
"prefer-destructuring": [
"error",
{
"AssignmentExpression": {
"array": true,
"object": false
},
"VariableDeclarator": {
"array": false,
"object": true
}
}
],
"prefer-numeric-literals": "off",
"prefer-promise-reject-errors": "off",
"prefer-rest-params": "warn",
"prefer-spread": "error",
"prefer-template": "warn",
"radix": "error",
"require-await": "off",
"require-jsdoc": "off",
"require-yield": "warn",
"sort-imports": "off",
"sort-keys": "off",
"sort-vars": "off",
"spaced-comment": ["error", "always"],
"strict": ["error", "never"],
"symbol-description": "warn",
"use-isnan": "error",
"valid-jsdoc": "off",
"valid-typeof": "error",
"vars-on-top": "off",
"yoda": "error"
}
}