-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
384 lines (384 loc) · 13.9 KB
/
.eslintrc
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.eslint.json",
"sourceType": "module",
"ecmaVersion": 2022
},
"env": {
"browser": true,
"es6": true,
"node": true
},
"rules": {
"@typescript-eslint/array-type": "off",
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"minimumDescriptionLength": 3,
"ts-check": true,
"ts-expect-error": false,
"ts-ignore": "allow-with-description",
"ts-nocheck": true
}
],
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"@typescript-eslint/class-literal-property-style": "error",
"@typescript-eslint/comma-dangle": ["error", "never"],
"@typescript-eslint/comma-spacing": ["error", { "before": false, "after": true }],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@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/func-call-spacing": ["error", "never"],
"@typescript-eslint/indent": ["error", "tab", { "SwitchCase": 1 }],
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/keyword-spacing": [
"error",
{
"overrides": {
"if": {
"after": true
},
"for": {
"after": true
},
"while": {
"after": true
},
"catch": {
"after": true
},
"switch": {
"after": true
}
}
}
],
"@typescript-eslint/lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-duplicate-imports": ["error", { "includeExports": false }],
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-empty-function": ["error", { "allow": ["arrowFunctions"] }],
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true, "ignoreIIFE": true }],
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unsafe-argument": "off",
"@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-expressions": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "none",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"typedefs": false
}
],
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/object-curly-spacing": ["error", "always"],
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-ts-expect-error": "warn",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/return-await": "warn",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/semi": ["error", "always", { "omitLastInOneLineBlock": false }],
"@typescript-eslint/space-before-blocks": ["error", "always"],
"@typescript-eslint/space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"@typescript-eslint/space-infix-ops": ["error", { "int32Hint": true }],
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/unified-signatures": "error",
"accessor-pairs": "warn",
"array-bracket-newline": ["error", "consistent"],
"array-bracket-spacing": [
"error",
"never",
{
"singleValue": false,
"objectsInArrays": false,
"arraysInArrays": false
}
],
"array-callback-return": "error",
"arrow-body-style": ["error", "as-needed"],
"arrow-spacing": ["error", { "before": true, "after": true }],
"block-scoped-var": "error",
"block-spacing": ["error", "always"],
"brace-style": "off",
"comma-dangle": "off",
"comma-spacing": "off",
"comma-style": ["error", "last"],
"complexity": ["warn", { "max": 35 }],
"computed-property-spacing": ["error", "never"],
"consistent-this": ["error", "self"],
"constructor-super": "error",
"curly": ["error", "multi-line", "consistent"],
"default-param-last": "off",
"dot-location": ["error", "property"],
"dot-notation": "off",
"eol-last": ["error", "always"],
"eqeqeq": ["error", "smart"],
"func-call-spacing": "off",
"func-name-matching": ["warn", "always"],
"func-names": ["warn", "as-needed"],
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"function-paren-newline": ["error", "consistent"],
"guard-for-in": "warn",
"generator-star-spacing": ["error", "before"],
"handle-callback-err": "error",
"indent": "off",
"jsx-quotes": ["error", "prefer-double"],
"key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "strict" }],
"keyword-spacing": "off",
"linebreak-style": ["error", "unix"],
"lines-between-class-members": "off",
"max-depth": ["error", { "max": 5 }],
"max-len": [
"error",
{
"code": 150,
"tabWidth": 2,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
],
"max-nested-callbacks": ["error", { "max": 4 }],
"max-statements-per-line": ["error", { "max": 2 }],
"multiline-ternary": ["error", "always-multiline"],
"new-parens": "error",
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 6 }],
"no-alert": "error",
"no-array-constructor": "off",
"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": ["error", { "allow": ["log", "warn", "error"] }],
"no-const-assign": "error",
"no-debugger": "error",
"no-delete-var": "error",
"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-character-class": "error",
"no-empty-function": "off",
"no-eq-null": "warn",
"no-extend-native": "warn",
"no-extra-label": "warn",
"no-extra-semi": "off",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implied-eval": "off",
"no-inline-comments": "error",
"no-invalid-regexp": "warn",
"no-invalid-this": "off",
"no-irregular-whitespace": [
"error",
{
"skipStrings": true,
"skipComments": true,
"skipRegExps": true,
"skipTemplates": true
}
],
"no-label-var": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-mixed-operators": "error",
"no-mixed-requires": "error",
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"no-multi-str": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"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-path-concat": "error",
"no-redeclare": "off",
"no-regex-spaces": "warn",
"no-return-assign": "error",
"no-return-await": "off",
"no-self-assign": "error",
"no-self-compare": "warn",
"no-sequences": "error",
"no-shadow": "off",
"no-shadow-restricted-names": "error",
"no-spaced-func": "error",
"no-sparse-arrays": "warn",
"no-this-before-super": "error",
"no-throw-literal": "off",
"no-trailing-spaces": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": ["error", { "defaultAssignment": false }],
"no-unreachable": "warn",
"no-unsafe-finally": "warn",
"no-unsafe-negation": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-unused-vars": "off",
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "warn",
"no-useless-constructor": "off",
"no-useless-escape": "error",
"no-useless-rename": "error",
"no-useless-return": "warn",
"no-var": "error",
"no-with": "error",
"no-warning-comments": "warn",
"no-whitespace-before-property": "error",
"object-curly-newline": ["error", { "multiline": true, "consistent": true }],
"object-curly-spacing": "off",
"one-var": ["error", "never"],
"operator-assignment": ["error", "always"],
"operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before" } }],
"padded-blocks": ["error", "never"],
"prefer-arrow-callback": "error",
"prefer-const": ["error", { "destructuring": "all" }],
"prefer-destructuring": [
"error",
{
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": true,
"object": true
}
},
{
"enforceForRenamedProperties": false
}
],
"prefer-object-has-own": "error",
"prefer-rest-params": "warn",
"prefer-spread": "error",
"prefer-template": "warn",
"quote-props": [
"error",
"consistent-as-needed",
{
"keywords": true,
"unnecessary": true,
"numbers": false
}
],
"quotes": "off",
"radix": "error",
"require-await": "off",
"require-yield": "warn",
"rest-spread-spacing": ["error", "never"],
"semi": "off",
"semi-spacing": ["error", { "before": false, "after": true }],
"semi-style": ["error", "last"],
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": ["error", "never"],
"space-infix-ops": "off",
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
"spaced-comment": ["error", "always"],
"strict": ["error", "never"],
"switch-colon-spacing": ["error", { "after": true, "before": false }],
"symbol-description": "error",
"template-curly-spacing": ["error", "never"],
"template-tag-spacing": ["error", "never"],
"unicode-bom": ["error", "never"],
"use-isnan": "error",
"valid-typeof": "error",
"wrap-iife": ["error", "inside"],
"yield-star-spacing": ["error", "before"],
"yoda": "error"
}
}