@spscommerce/eslint-config-typescript 9.0.4 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GUIDE.md +5 -3
- package/lib-esm/flat.mjs +669 -2332
- package/package.json +2 -2
package/lib-esm/flat.mjs
CHANGED
|
@@ -1,2336 +1,673 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
-
* disallow use of debugger ✅
|
|
54
|
-
* https://eslint.org/docs/rules/no-debugger
|
|
55
|
-
*/
|
|
56
|
-
"no-debugger": "error",
|
|
57
|
-
/**
|
|
58
|
-
* disallow duplicate arguments in functions ✅
|
|
59
|
-
* https://eslint.org/docs/rules/no-dupe-args
|
|
60
|
-
*/
|
|
61
|
-
"no-dupe-args": "error",
|
|
62
|
-
/**
|
|
63
|
-
* Disallow duplicate conditions in if-else-if chains ✅
|
|
64
|
-
* https://eslint.org/docs/rules/no-dupe-else-if
|
|
65
|
-
*/
|
|
66
|
-
"no-dupe-else-if": "error",
|
|
67
|
-
/**
|
|
68
|
-
* disallow duplicate keys when creating object literals ✅
|
|
69
|
-
* https://eslint.org/docs/rules/no-dupe-keys
|
|
70
|
-
*/
|
|
71
|
-
"no-dupe-keys": "error",
|
|
72
|
-
/**
|
|
73
|
-
* disallow a duplicate case label ✅
|
|
74
|
-
* https://eslint.org/docs/rules/no-duplicate-case
|
|
75
|
-
*/
|
|
76
|
-
"no-duplicate-case": "error",
|
|
77
|
-
/**
|
|
78
|
-
* disallow empty statements ✅
|
|
79
|
-
* https://eslint.org/docs/rules/no-empty
|
|
80
|
-
*/
|
|
81
|
-
"no-empty": "error",
|
|
82
|
-
/**
|
|
83
|
-
* disallow the use of empty character classes in regular expressions ✅
|
|
84
|
-
* https://eslint.org/docs/rules/no-empty-character-class
|
|
85
|
-
*/
|
|
86
|
-
"no-empty-character-class": "error",
|
|
87
|
-
/**
|
|
88
|
-
* disallow assigning to the exception in a catch block ✅
|
|
89
|
-
* https://eslint.org/docs/rules/no-ex-assign
|
|
90
|
-
*/
|
|
91
|
-
"no-ex-assign": "error",
|
|
92
|
-
/**
|
|
93
|
-
* disallow double-negation boolean casts in a boolean context ✅ 🔧
|
|
94
|
-
* https://eslint.org/docs/rules/no-extra-boolean-cast
|
|
95
|
-
* Disabled because it conflicts with @typescript-eslint/strict-boolean-expressions
|
|
96
|
-
*/
|
|
97
|
-
"no-extra-boolean-cast": "off",
|
|
98
|
-
/**
|
|
99
|
-
* disallow unnecessary parentheses 🔧
|
|
100
|
-
* https://eslint.org/docs/rules/no-extra-parens
|
|
101
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md
|
|
102
|
-
*/
|
|
103
|
-
"no-extra-parens": "off",
|
|
104
|
-
"@typescript-eslint/no-extra-parens": "off",
|
|
105
|
-
/**
|
|
106
|
-
* disallow unnecessary semicolons ✅ 🔧
|
|
107
|
-
* https://eslint.org/docs/rules/no-extra-semi
|
|
108
|
-
*/
|
|
109
|
-
"no-extra-semi": "error",
|
|
110
|
-
/**
|
|
111
|
-
* disallow overwriting functions written as function declarations ✅
|
|
112
|
-
* https://eslint.org/docs/rules/no-func-assign
|
|
113
|
-
*/
|
|
114
|
-
"no-func-assign": "error",
|
|
115
|
-
/**
|
|
116
|
-
* disallow assigning to imported bindings ✅
|
|
117
|
-
* https://eslint.org/docs/rules/no-import-assign
|
|
118
|
-
*/
|
|
119
|
-
"no-import-assign": "error",
|
|
120
|
-
/**
|
|
121
|
-
* disallow function or variable declarations in nested blocks ✅
|
|
122
|
-
* https://eslint.org/docs/rules/no-inner-declarations
|
|
123
|
-
*/
|
|
124
|
-
"no-inner-declarations": "error",
|
|
125
|
-
/**
|
|
126
|
-
* disallow invalid regular expression strings in the RegExp constructor ✅
|
|
127
|
-
* https://eslint.org/docs/rules/no-invalid-regexp
|
|
128
|
-
*/
|
|
129
|
-
"no-invalid-regexp": "error",
|
|
130
|
-
/**
|
|
131
|
-
* disallow irregular whitespace outside of strings and comments ✅
|
|
132
|
-
* https://eslint.org/docs/rules/no-irregular-whitespace
|
|
133
|
-
*/
|
|
134
|
-
"no-irregular-whitespace": "error",
|
|
135
|
-
/**
|
|
136
|
-
* disallow literal numbers that lose precision ✅
|
|
137
|
-
* https://eslint.org/docs/rules/no-loss-of-precision
|
|
138
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loss-of-precision.md
|
|
139
|
-
*/
|
|
140
|
-
"no-loss-of-precision": "off",
|
|
141
|
-
"@typescript-eslint/no-loss-of-precision": "error",
|
|
142
|
-
/**
|
|
143
|
-
* disallow characters which are made with multiple code points in character class syntax ✅
|
|
144
|
-
* https://eslint.org/docs/rules/no-misleading-character-class
|
|
145
|
-
*/
|
|
146
|
-
"no-misleading-character-class": "error",
|
|
147
|
-
/**
|
|
148
|
-
* disallow the use of object properties of the global object (Math and JSON) as functions ✅
|
|
149
|
-
* https://eslint.org/docs/rules/no-obj-calls
|
|
150
|
-
*/
|
|
151
|
-
"no-obj-calls": "error",
|
|
152
|
-
/**
|
|
153
|
-
* disallow returning values from Promise executor functions
|
|
154
|
-
* https://eslint.org/docs/rules/no-promise-executor-return
|
|
155
|
-
*/
|
|
156
|
-
"no-promise-executor-return": "error",
|
|
157
|
-
/**
|
|
158
|
-
* disallow use of Object.prototypes builtins directly ✅
|
|
159
|
-
* https://eslint.org/docs/rules/no-prototype-builtins
|
|
160
|
-
*/
|
|
161
|
-
"no-prototype-builtins": "off",
|
|
162
|
-
/**
|
|
163
|
-
* disallow multiple spaces in a regular expression literal ✅ 🔧
|
|
164
|
-
* https://eslint.org/docs/rules/no-regex-spaces
|
|
165
|
-
*/
|
|
166
|
-
"no-regex-spaces": "error",
|
|
167
|
-
/**
|
|
168
|
-
* disallow returning values from setters ✅
|
|
169
|
-
* https://eslint.org/docs/rules/no-setter-return
|
|
170
|
-
* Off because getters and setters are forbidden
|
|
171
|
-
*/
|
|
172
|
-
"no-setter-return": "off",
|
|
173
|
-
/**
|
|
174
|
-
* disallow sparse arrays ✅
|
|
175
|
-
* https://eslint.org/docs/rules/no-sparse-arrays
|
|
176
|
-
* only forbids sparse array literals, not `new Array(n)`
|
|
177
|
-
*/
|
|
178
|
-
"no-sparse-arrays": "error",
|
|
179
|
-
/**
|
|
180
|
-
* disallow template literal placeholder syntax in regular strings
|
|
181
|
-
* https://eslint.org/docs/rules/no-template-curly-in-string
|
|
182
|
-
*/
|
|
183
|
-
"no-template-curly-in-string": "error",
|
|
184
|
-
/**
|
|
185
|
-
* avoid code that looks like two expressions but is actually one ✅
|
|
186
|
-
* https://eslint.org/docs/rules/no-unexpected-multiline
|
|
187
|
-
*/
|
|
188
|
-
"no-unexpected-multiline": "error",
|
|
189
|
-
/**
|
|
190
|
-
* disallow unreachable statements after a return, throw, continue, or break statement ✅
|
|
191
|
-
* https://eslint.org/docs/rules/no-unreachable
|
|
192
|
-
*/
|
|
193
|
-
"no-unreachable": "error",
|
|
194
|
-
/**
|
|
195
|
-
* disallow loops with a body that allows only one iteration
|
|
196
|
-
* https://eslint.org/docs/rules/no-unreachable-loop
|
|
197
|
-
*/
|
|
198
|
-
"no-unreachable-loop": "error",
|
|
199
|
-
/**
|
|
200
|
-
* disallow return/throw/break/continue inside finally blocks ✅
|
|
201
|
-
* https://eslint.org/docs/rules/no-unsafe-finally
|
|
202
|
-
*/
|
|
203
|
-
"no-unsafe-finally": "error",
|
|
204
|
-
/**
|
|
205
|
-
* disallow negating the left operand of relational operators ✅
|
|
206
|
-
* https://eslint.org/docs/rules/no-unsafe-negation
|
|
207
|
-
*/
|
|
208
|
-
"no-unsafe-negation": "error",
|
|
209
|
-
/**
|
|
210
|
-
* disallow use of optional chaining in contexts where the undefined value is not allowed ✅
|
|
211
|
-
* https://eslint.org/docs/rules/no-unsafe-optional-chaining
|
|
212
|
-
*/
|
|
213
|
-
"no-unsafe-optional-chaining": "error",
|
|
214
|
-
/**
|
|
215
|
-
* Disallow useless backreferences in regular expressions ✅
|
|
216
|
-
* https://eslint.org/docs/rules/no-useless-backreference
|
|
217
|
-
*/
|
|
218
|
-
"no-useless-backreference": "off",
|
|
219
|
-
/**
|
|
220
|
-
* Disallow assignments that can lead to race conditions due to usage of await or yield
|
|
221
|
-
* https://eslint.org/docs/rules/require-atomic-updates
|
|
222
|
-
*/
|
|
223
|
-
"require-atomic-updates": "error",
|
|
224
|
-
/**
|
|
225
|
-
* disallow comparisons with the value NaN ✅
|
|
226
|
-
* https://eslint.org/docs/rules/use-isnan
|
|
227
|
-
*/
|
|
228
|
-
"use-isnan": "error",
|
|
229
|
-
/**
|
|
230
|
-
* ensure that the results of typeof are compared against a valid string ✅
|
|
231
|
-
* https://eslint.org/docs/rules/valid-typeof
|
|
232
|
-
*/
|
|
233
|
-
"valid-typeof": ["error", { requireStringLiterals: !0 }]
|
|
234
|
-
}, n = {
|
|
235
|
-
/**
|
|
236
|
-
* enforces getter/setter pairs in objects
|
|
237
|
-
* https://eslint.org/docs/rules/accessor-pairs
|
|
238
|
-
* Off because getters and setters are forbidden
|
|
239
|
-
*/
|
|
240
|
-
"accessor-pairs": "off",
|
|
241
|
-
/**
|
|
242
|
-
* enforces return statements in callbacks of array's methods
|
|
243
|
-
* https://eslint.org/docs/rules/array-callback-return
|
|
244
|
-
*/
|
|
245
|
-
"array-callback-return": ["error", { allowImplicit: !0 }],
|
|
246
|
-
/**
|
|
247
|
-
* treat var statements as if they were block scoped
|
|
248
|
-
* https://eslint.org/docs/rules/block-scoped-var
|
|
249
|
-
* Off because `var` is forbidden
|
|
250
|
-
*/
|
|
251
|
-
"block-scoped-var": "off",
|
|
252
|
-
/**
|
|
253
|
-
* specify the maximum cyclomatic complexity allowed in a program
|
|
254
|
-
* https://eslint.org/docs/rules/complexity
|
|
255
|
-
*/
|
|
256
|
-
complexity: "off",
|
|
257
|
-
/**
|
|
258
|
-
* enforce that class methods use "this"
|
|
259
|
-
* https://eslint.org/docs/rules/class-methods-use-this
|
|
260
|
-
*/
|
|
261
|
-
"class-methods-use-this": "error",
|
|
262
|
-
/**
|
|
263
|
-
* require return statements to either always or never specify values
|
|
264
|
-
* https://eslint.org/docs/rules/consistent-return
|
|
265
|
-
*/
|
|
266
|
-
"consistent-return": "off",
|
|
267
|
-
/**
|
|
268
|
-
* specify curly brace conventions for all control statements 🔧
|
|
269
|
-
* https://eslint.org/docs/rules/curly
|
|
270
|
-
*/
|
|
271
|
-
curly: ["error", "multi-line"],
|
|
272
|
-
/**
|
|
273
|
-
* require default case in switch statements
|
|
274
|
-
* https://eslint.org/docs/rules/default-case
|
|
275
|
-
*/
|
|
276
|
-
"default-case": ["error", { commentPattern: "^no default$" }],
|
|
277
|
-
/**
|
|
278
|
-
* Enforce default clauses in switch statements to be last
|
|
279
|
-
* https://eslint.org/docs/rules/default-case-last
|
|
280
|
-
*/
|
|
281
|
-
"default-case-last": "error",
|
|
282
|
-
/**
|
|
283
|
-
* enforce default parameters to be last
|
|
284
|
-
* https://eslint.org/docs/rules/default-param-last
|
|
285
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/default-param-last.md
|
|
286
|
-
*/
|
|
287
|
-
"default-param-last": "off",
|
|
288
|
-
"@typescript-eslint/default-param-last": "error",
|
|
289
|
-
/**
|
|
290
|
-
* enforces consistent newlines before or after dots
|
|
291
|
-
* https://eslint.org/docs/rules/dot-location
|
|
292
|
-
*/
|
|
293
|
-
"dot-location": ["error", "property"],
|
|
294
|
-
/**
|
|
295
|
-
* encourages use of dot notation whenever possible 🔧
|
|
296
|
-
* https://eslint.org/docs/rules/dot-notation
|
|
297
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md
|
|
298
|
-
*/
|
|
299
|
-
"dot-notation": "off",
|
|
300
|
-
"@typescript-eslint/dot-notation": ["error", { allowKeywords: !0 }],
|
|
301
|
-
/**
|
|
302
|
-
* require the use of === and !== 🔧
|
|
303
|
-
* https://eslint.org/docs/rules/eqeqeq
|
|
304
|
-
*/
|
|
305
|
-
eqeqeq: [
|
|
306
|
-
"error",
|
|
307
|
-
"always",
|
|
308
|
-
{ null: "ignore" }
|
|
309
|
-
],
|
|
310
|
-
/**
|
|
311
|
-
* Require grouped accessor pairs in object literals and classes
|
|
312
|
-
* https://eslint.org/docs/rules/grouped-accessor-pairs
|
|
313
|
-
* Off because getters and setters are forbidden
|
|
314
|
-
*/
|
|
315
|
-
"grouped-accessor-pairs": "off",
|
|
316
|
-
/**
|
|
317
|
-
* make sure for-in loops have an if statement
|
|
318
|
-
* https://eslint.org/docs/rules/guard-for-in
|
|
319
|
-
* Off because for-in is forbidden
|
|
320
|
-
*/
|
|
321
|
-
"guard-for-in": "off",
|
|
322
|
-
/**
|
|
323
|
-
* enforce a maximum number of classes per file
|
|
324
|
-
* https://eslint.org/docs/rules/max-classes-per-file
|
|
325
|
-
*/
|
|
326
|
-
"max-classes-per-file": ["error", 1],
|
|
327
|
-
/**
|
|
328
|
-
* disallow the use of alert, confirm, and prompt
|
|
329
|
-
* https://eslint.org/docs/rules/no-alert
|
|
330
|
-
*/
|
|
331
|
-
"no-alert": "error",
|
|
332
|
-
/**
|
|
333
|
-
* disallow use of arguments.caller or arguments.callee
|
|
334
|
-
* https://eslint.org/docs/rules/no-caller
|
|
335
|
-
*/
|
|
336
|
-
"no-caller": "error",
|
|
337
|
-
/**
|
|
338
|
-
* disallow lexical declarations in case/default clauses ✅
|
|
339
|
-
* https://eslint.org/docs/rules/no-case-declarations
|
|
340
|
-
*/
|
|
341
|
-
"no-case-declarations": "error",
|
|
342
|
-
/**
|
|
343
|
-
* Disallow returning value in constructor
|
|
344
|
-
* https://eslint.org/docs/rules/no-constructor-return
|
|
345
|
-
*/
|
|
346
|
-
"no-constructor-return": "error",
|
|
347
|
-
/**
|
|
348
|
-
* disallow division operators explicitly at beginning of regular expression 🔧
|
|
349
|
-
* https://eslint.org/docs/rules/no-div-regex
|
|
350
|
-
*/
|
|
351
|
-
"no-div-regex": "off",
|
|
352
|
-
/**
|
|
353
|
-
* disallow else after a return in an if 🔧
|
|
354
|
-
* https://eslint.org/docs/rules/no-else-return
|
|
355
|
-
*/
|
|
356
|
-
"no-else-return": "off",
|
|
357
|
-
/**
|
|
358
|
-
* disallow empty functions
|
|
359
|
-
* https://eslint.org/docs/rules/no-empty-function
|
|
360
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md
|
|
361
|
-
*/
|
|
362
|
-
"no-empty-function": "off",
|
|
363
|
-
"@typescript-eslint/no-empty-function": "off",
|
|
364
|
-
/**
|
|
365
|
-
* disallow empty destructuring patterns ✅
|
|
366
|
-
* https://eslint.org/docs/rules/no-empty-pattern
|
|
367
|
-
*/
|
|
368
|
-
"no-empty-pattern": "error",
|
|
369
|
-
/**
|
|
370
|
-
* disallow comparisons to null without a type-checking operator
|
|
371
|
-
* https://eslint.org/docs/rules/no-eq-null
|
|
372
|
-
* Off because it's superceded by eqeqeq
|
|
373
|
-
*/
|
|
374
|
-
"no-eq-null": "off",
|
|
375
|
-
/**
|
|
376
|
-
* disallow use of eval()
|
|
377
|
-
* https://eslint.org/docs/rules/no-eval
|
|
378
|
-
*/
|
|
379
|
-
"no-eval": "error",
|
|
380
|
-
/**
|
|
381
|
-
* disallow adding to native types
|
|
382
|
-
* https://eslint.org/docs/rules/no-extend-native
|
|
383
|
-
*/
|
|
384
|
-
"no-extend-native": "error",
|
|
385
|
-
/**
|
|
386
|
-
* disallow unnecessary function binding 🔧
|
|
387
|
-
* https://eslint.org/docs/rules/no-extra-bind
|
|
388
|
-
*/
|
|
389
|
-
"no-extra-bind": "error",
|
|
390
|
-
/**
|
|
391
|
-
* disallow Unnecessary Labels 🔧
|
|
392
|
-
* https://eslint.org/docs/rules/no-extra-label
|
|
393
|
-
*/
|
|
394
|
-
"no-extra-label": "error",
|
|
395
|
-
/**
|
|
396
|
-
* disallow fallthrough of case statements ✅
|
|
397
|
-
* https://eslint.org/docs/rules/no-fallthrough
|
|
398
|
-
*/
|
|
399
|
-
"no-fallthrough": "error",
|
|
400
|
-
/**
|
|
401
|
-
* disallow the use of leading or trailing decimal points in numeric literals 🔧
|
|
402
|
-
* https://eslint.org/docs/rules/no-floating-decimal
|
|
403
|
-
*/
|
|
404
|
-
"no-floating-decimal": "error",
|
|
405
|
-
/**
|
|
406
|
-
* disallow reassignments of native objects or read-only globals ✅
|
|
407
|
-
* https://eslint.org/docs/rules/no-global-assign
|
|
408
|
-
*/
|
|
409
|
-
"no-global-assign": "error",
|
|
410
|
-
/**
|
|
411
|
-
* disallow implicit type conversions 🔧
|
|
412
|
-
* https://eslint.org/docs/rules/no-implicit-coercion
|
|
413
|
-
*/
|
|
414
|
-
"no-implicit-coercion": [
|
|
415
|
-
"error",
|
|
416
|
-
{
|
|
417
|
-
boolean: !1,
|
|
418
|
-
number: !0,
|
|
419
|
-
string: !0
|
|
420
|
-
}
|
|
421
|
-
],
|
|
422
|
-
/**
|
|
423
|
-
* disallow var and named functions in global scope
|
|
424
|
-
* https://eslint.org/docs/rules/no-implicit-globals
|
|
425
|
-
* disabled because it can't distinguish between a file with no imports and a browser script
|
|
426
|
-
*/
|
|
427
|
-
"no-implicit-globals": "off",
|
|
428
|
-
/**
|
|
429
|
-
* disallow use of eval()-like methods
|
|
430
|
-
* https://eslint.org/docs/rules/no-implied-eval
|
|
431
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implied-eval.md
|
|
432
|
-
*/
|
|
433
|
-
"no-implied-eval": "off",
|
|
434
|
-
"@typescript-eslint/no-implied-eval": "error",
|
|
435
|
-
/**
|
|
436
|
-
* disallow assignment to imported bindings
|
|
437
|
-
* https://eslint.org/docs/rules/no-import-assign
|
|
438
|
-
*/
|
|
439
|
-
"no-import-assign": "error",
|
|
440
|
-
/**
|
|
441
|
-
* disallow this keywords outside of classes or class-like objects
|
|
442
|
-
* https://eslint.org/docs/rules/no-invalid-this
|
|
443
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-invalid-this.md
|
|
444
|
-
*/
|
|
445
|
-
"no-invalid-this": "off",
|
|
446
|
-
"@typescript-eslint/no-invalid-this": "off",
|
|
447
|
-
/**
|
|
448
|
-
* disallow usage of __iterator__ property
|
|
449
|
-
* https://eslint.org/docs/rules/no-iterator
|
|
450
|
-
*/
|
|
451
|
-
"no-iterator": "error",
|
|
452
|
-
/**
|
|
453
|
-
* disallow use of labels for anything other than loops and switches
|
|
454
|
-
* https://eslint.org/docs/rules/no-labels
|
|
455
|
-
*/
|
|
456
|
-
"no-labels": "error",
|
|
457
|
-
/**
|
|
458
|
-
* disallow unnecessary nested blocks
|
|
459
|
-
* https://eslint.org/docs/rules/no-lone-blocks
|
|
460
|
-
*/
|
|
461
|
-
"no-lone-blocks": "error",
|
|
462
|
-
/**
|
|
463
|
-
* disallow creation of functions within loops
|
|
464
|
-
* https://eslint.org/docs/rules/no-loop-func
|
|
465
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md
|
|
466
|
-
*/
|
|
467
|
-
"no-loop-func": "off",
|
|
468
|
-
"@typescript-eslint/no-loop-func": "error",
|
|
469
|
-
/**
|
|
470
|
-
* disallow magic numbers
|
|
471
|
-
* https://eslint.org/docs/rules/no-magic-numbers
|
|
472
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md
|
|
473
|
-
*/
|
|
474
|
-
"no-magic-numbers": "off",
|
|
475
|
-
"@typescript-eslint/no-magic-numbers": [
|
|
476
|
-
"error",
|
|
477
|
-
{
|
|
478
|
-
ignore: [
|
|
479
|
-
-1,
|
|
480
|
-
0,
|
|
481
|
-
1,
|
|
482
|
-
2
|
|
483
|
-
],
|
|
484
|
-
ignoreArrayIndexes: !0
|
|
485
|
-
}
|
|
486
|
-
],
|
|
487
|
-
/**
|
|
488
|
-
* disallow use of multiple spaces 🔧
|
|
489
|
-
* https://eslint.org/docs/rules/no-multi-spaces
|
|
490
|
-
*/
|
|
491
|
-
"no-multi-spaces": "error",
|
|
492
|
-
/**
|
|
493
|
-
* disallow use of multiline strings
|
|
494
|
-
* https://eslint.org/docs/rules/no-multi-str
|
|
495
|
-
*/
|
|
496
|
-
"no-multi-str": "error",
|
|
497
|
-
/**
|
|
498
|
-
* disallow use of new operator when not part of the assignment or comparison
|
|
499
|
-
* https://eslint.org/docs/rules/no-new
|
|
500
|
-
*/
|
|
501
|
-
"no-new": "error",
|
|
502
|
-
/**
|
|
503
|
-
* disallow use of new operator for Function object
|
|
504
|
-
* https://eslint.org/docs/rules/no-new-func
|
|
505
|
-
*/
|
|
506
|
-
"no-new-func": "error",
|
|
507
|
-
/**
|
|
508
|
-
* disallows creating new instances of String, Number, and Boolean
|
|
509
|
-
* https://eslint.org/docs/rules/no-new-wrappers
|
|
510
|
-
*/
|
|
511
|
-
"no-new-wrappers": "error",
|
|
512
|
-
/**
|
|
513
|
-
* Disallow \8 and \9 escape sequences in string literals ✅
|
|
514
|
-
* https://eslint.org/docs/rules/no-nonoctal-decimal-escape
|
|
515
|
-
*/
|
|
516
|
-
"no-nonoctal-decimal-escape": "error",
|
|
517
|
-
/**
|
|
518
|
-
* disallow use of (old style) octal literals ✅
|
|
519
|
-
* https://eslint.org/docs/rules/no-octal
|
|
520
|
-
*/
|
|
521
|
-
"no-octal": "error",
|
|
522
|
-
/**
|
|
523
|
-
* disallow use of octal escape sequences in string literals, such as
|
|
524
|
-
* https://eslint.org/docs/rules/no-octal-escape
|
|
525
|
-
*/
|
|
526
|
-
"no-octal-escape": "error",
|
|
527
|
-
/**
|
|
528
|
-
* disallow reassignment of function parameters, and
|
|
529
|
-
* disallow parameter object manipulation except for specific exclusions
|
|
530
|
-
* rule: https://eslint.org/docs/rules/no-param-reassign.html
|
|
531
|
-
*/
|
|
532
|
-
"no-param-reassign": [
|
|
533
|
-
"error",
|
|
534
|
-
{
|
|
535
|
-
props: !0,
|
|
536
|
-
ignorePropertyModificationsFor: [
|
|
537
|
-
"acc",
|
|
538
|
-
"accumulator"
|
|
539
|
-
]
|
|
540
|
-
}
|
|
541
|
-
],
|
|
542
|
-
/**
|
|
543
|
-
* disallow usage of __proto__ property
|
|
544
|
-
* https://eslint.org/docs/rules/no-proto
|
|
545
|
-
*/
|
|
546
|
-
"no-proto": "error",
|
|
547
|
-
/**
|
|
548
|
-
* disallow declaring the same variable more than once ✅
|
|
549
|
-
* https://eslint.org/docs/rules/no-redeclare
|
|
550
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md
|
|
551
|
-
*/
|
|
552
|
-
"no-redeclare": "off",
|
|
553
|
-
"@typescript-eslint/no-redeclare": "error",
|
|
554
|
-
/**
|
|
555
|
-
* disallow certain object properties
|
|
556
|
-
* https://eslint.org/docs/rules/no-restricted-properties
|
|
557
|
-
*/
|
|
558
|
-
"no-restricted-properties": [
|
|
559
|
-
"error",
|
|
560
|
-
{
|
|
561
|
-
object: "arguments",
|
|
562
|
-
property: "callee",
|
|
563
|
-
message: "arguments.callee is deprecated"
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
object: "global",
|
|
567
|
-
property: "isFinite",
|
|
568
|
-
message: "Please use Number.isFinite instead"
|
|
569
|
-
},
|
|
570
|
-
{
|
|
571
|
-
object: "self",
|
|
572
|
-
property: "isFinite",
|
|
573
|
-
message: "Please use Number.isFinite instead"
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
object: "window",
|
|
577
|
-
property: "isFinite",
|
|
578
|
-
message: "Please use Number.isFinite instead"
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
object: "global",
|
|
582
|
-
property: "isNaN",
|
|
583
|
-
message: "Please use Number.isNaN instead"
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
object: "self",
|
|
587
|
-
property: "isNaN",
|
|
588
|
-
message: "Please use Number.isNaN instead"
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
object: "window",
|
|
592
|
-
property: "isNaN",
|
|
593
|
-
message: "Please use Number.isNaN instead"
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
property: "__defineGetter__",
|
|
597
|
-
message: "Please use Object.defineProperty instead."
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
property: "__defineSetter__",
|
|
601
|
-
message: "Please use Object.defineProperty instead."
|
|
602
|
-
}
|
|
603
|
-
],
|
|
604
|
-
/**
|
|
605
|
-
* disallow use of assignment in return statement
|
|
606
|
-
* https://eslint.org/docs/rules/no-return-assign
|
|
607
|
-
*/
|
|
608
|
-
"no-return-assign": "error",
|
|
609
|
-
/**
|
|
610
|
-
* disallow redundant `return await`
|
|
611
|
-
* https://eslint.org/docs/rules/no-return-await
|
|
612
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md
|
|
613
|
-
*/
|
|
614
|
-
"no-return-await": "off",
|
|
615
|
-
"@typescript-eslint/return-await": "error",
|
|
616
|
-
/**
|
|
617
|
-
* disallow use of `javascript:` urls.
|
|
618
|
-
* https://eslint.org/docs/rules/no-script-url
|
|
619
|
-
*/
|
|
620
|
-
"no-script-url": "error",
|
|
621
|
-
/**
|
|
622
|
-
* disallow self assignment ✅
|
|
623
|
-
* https://eslint.org/docs/rules/no-self-assign
|
|
624
|
-
*/
|
|
625
|
-
"no-self-assign": "error",
|
|
626
|
-
/**
|
|
627
|
-
* disallow comparisons where both sides are exactly the same
|
|
628
|
-
* https://eslint.org/docs/rules/no-self-compare
|
|
629
|
-
*/
|
|
630
|
-
"no-self-compare": "error",
|
|
631
|
-
/**
|
|
632
|
-
* disallow use of comma operator
|
|
633
|
-
* https://eslint.org/docs/rules/no-sequences
|
|
634
|
-
*/
|
|
635
|
-
"no-sequences": "error",
|
|
636
|
-
/**
|
|
637
|
-
* restrict what can be thrown as an exception
|
|
638
|
-
* https://eslint.org/docs/rules/no-throw-literal
|
|
639
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/only-throw-error.mdx
|
|
640
|
-
*/
|
|
641
|
-
"no-throw-literal": "off",
|
|
642
|
-
"@typescript-eslint/only-throw-error": "error",
|
|
643
|
-
/**
|
|
644
|
-
* disallow unmodified conditions of loops
|
|
645
|
-
* https://eslint.org/docs/rules/no-unmodified-loop-condition
|
|
646
|
-
*/
|
|
647
|
-
"no-unmodified-loop-condition": "off",
|
|
648
|
-
/**
|
|
649
|
-
* disallow usage of expressions in statement position
|
|
650
|
-
* https://eslint.org/docs/rules/no-unused-expressions
|
|
651
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md
|
|
652
|
-
*/
|
|
653
|
-
"no-unused-expressions": "off",
|
|
654
|
-
"@typescript-eslint/no-unused-expressions": ["error", { allowTaggedTemplates: !1 }],
|
|
655
|
-
/**
|
|
656
|
-
* disallow unused labels ✅ 🔧
|
|
657
|
-
* https://eslint.org/docs/rules/no-unused-labels
|
|
658
|
-
*/
|
|
659
|
-
"no-unused-labels": "error",
|
|
660
|
-
/**
|
|
661
|
-
* disallow useless backreferences in regular expressions
|
|
662
|
-
* https://eslint.org/docs/rules/no-useless-backreference
|
|
663
|
-
*/
|
|
664
|
-
"no-useless-backreference": "error",
|
|
665
|
-
/**
|
|
666
|
-
* disallow unnecessary .call() and .apply()
|
|
667
|
-
* https://eslint.org/docs/rules/no-useless-call
|
|
668
|
-
*/
|
|
669
|
-
"no-useless-call": "off",
|
|
670
|
-
/**
|
|
671
|
-
* Disallow unnecessary catch clauses ✅
|
|
672
|
-
* https://eslint.org/docs/rules/no-useless-catch
|
|
673
|
-
*/
|
|
674
|
-
"no-useless-catch": "error",
|
|
675
|
-
/**
|
|
676
|
-
* disallow useless string concatenation
|
|
677
|
-
* https://eslint.org/docs/rules/no-useless-concat
|
|
678
|
-
*/
|
|
679
|
-
"no-useless-concat": "error",
|
|
680
|
-
/**
|
|
681
|
-
* disallow unnecessary string escaping ✅
|
|
682
|
-
* https://eslint.org/docs/rules/no-useless-escape
|
|
683
|
-
*/
|
|
684
|
-
"no-useless-escape": "error",
|
|
685
|
-
/**
|
|
686
|
-
* disallow redundant return; keywords 🔧
|
|
687
|
-
* https://eslint.org/docs/rules/no-useless-return
|
|
688
|
-
*/
|
|
689
|
-
"no-useless-return": "error",
|
|
690
|
-
/**
|
|
691
|
-
* disallow use of void operator
|
|
692
|
-
* https://eslint.org/docs/rules/no-void
|
|
693
|
-
* Typing for this rule config seems to be incorrect
|
|
694
|
-
*/
|
|
695
|
-
"no-void": ["error", { allowAsStatement: !0 }],
|
|
696
|
-
/**
|
|
697
|
-
* disallow usage of configurable warning terms in comments: e.g. todo
|
|
698
|
-
* https://eslint.org/docs/rules/no-warning-comments
|
|
699
|
-
*/
|
|
700
|
-
"no-warning-comments": "off",
|
|
701
|
-
/**
|
|
702
|
-
* disallow use of the with statement ✅
|
|
703
|
-
* https://eslint.org/docs/rules/no-with
|
|
704
|
-
*/
|
|
705
|
-
"no-with": "error",
|
|
706
|
-
/**
|
|
707
|
-
* require `Object.hasOwn` instead of `Object.prototype.hasOwnProperty.call`
|
|
708
|
-
* https://eslint.org/docs/rules/prefer-object-has-own
|
|
709
|
-
*/
|
|
710
|
-
"prefer-object-has-own": "error",
|
|
711
|
-
/**
|
|
712
|
-
* require using Error objects as Promise rejection reasons
|
|
713
|
-
* https://eslint.org/docs/rules/prefer-promise-reject-errors
|
|
714
|
-
*/
|
|
715
|
-
"prefer-promise-reject-errors": ["error", { allowEmptyReject: !0 }],
|
|
716
|
-
/**
|
|
717
|
-
* Suggest using named capture group in regular expression
|
|
718
|
-
* https://eslint.org/docs/rules/prefer-named-capture-group
|
|
719
|
-
*/
|
|
720
|
-
"prefer-named-capture-group": "off",
|
|
721
|
-
/**
|
|
722
|
-
* disallow use of the `RegExp` constructor in favor of regular expression literals
|
|
723
|
-
* https://eslint.org/docs/rules/prefer-regex-literals
|
|
724
|
-
*/
|
|
725
|
-
"prefer-regex-literals": "error",
|
|
726
|
-
/**
|
|
727
|
-
* require use of the second argument for parseInt()
|
|
728
|
-
* https://eslint.org/docs/rules/radix
|
|
729
|
-
*/
|
|
730
|
-
radix: "error",
|
|
731
|
-
/**
|
|
732
|
-
* require `await` in `async function` (note: this is a horrible rule that should never be used)
|
|
733
|
-
* https://eslint.org/docs/rules/require-await
|
|
734
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md
|
|
735
|
-
*/
|
|
736
|
-
"require-await": "off",
|
|
737
|
-
"@typescript-eslint/require-await": "off",
|
|
738
|
-
/**
|
|
739
|
-
* Enforce the use of u flag on RegExp
|
|
740
|
-
* https://eslint.org/docs/rules/require-unicode-regexp
|
|
741
|
-
*/
|
|
742
|
-
"require-unicode-regexp": "off",
|
|
743
|
-
/**
|
|
744
|
-
* requires to declare all vars on top of their containing scope
|
|
745
|
-
* https://eslint.org/docs/rules/vars-on-top
|
|
746
|
-
* Off because var is forbidden
|
|
747
|
-
*/
|
|
748
|
-
"vars-on-top": "off",
|
|
749
|
-
/**
|
|
750
|
-
* require immediate function invocation to be wrapped in parentheses
|
|
751
|
-
* https://eslint.org/docs/rules/wrap-iife.html
|
|
752
|
-
*/
|
|
753
|
-
"wrap-iife": [
|
|
754
|
-
"error",
|
|
755
|
-
"outside",
|
|
756
|
-
{ functionPrototypeMethods: !1 }
|
|
757
|
-
],
|
|
758
|
-
/**
|
|
759
|
-
* require or disallow Yoda conditions 🔧
|
|
760
|
-
* https://eslint.org/docs/rules/yoda
|
|
761
|
-
*/
|
|
762
|
-
yoda: "error"
|
|
763
|
-
}, i = {
|
|
764
|
-
/**
|
|
765
|
-
* disallow the 'use strict' directive 🔧
|
|
766
|
-
* https://eslint.org/docs/rules/strict
|
|
767
|
-
* this is handled for you and does not need to be present in your source files
|
|
768
|
-
*/
|
|
769
|
-
strict: ["error", "never"]
|
|
1
|
+
import { parser as e, plugin as t } from "typescript-eslint";
|
|
2
|
+
import n from "eslint-plugin-import";
|
|
3
|
+
import r from "@stylistic/eslint-plugin";
|
|
4
|
+
//#region src/rules/possibleErrors.ts
|
|
5
|
+
var i = {
|
|
6
|
+
"for-direction": "error",
|
|
7
|
+
"getter-return": "off",
|
|
8
|
+
"no-async-promise-executor": "error",
|
|
9
|
+
"no-await-in-loop": "error",
|
|
10
|
+
"no-compare-neg-zero": "error",
|
|
11
|
+
"no-cond-assign": ["error", "always"],
|
|
12
|
+
"no-console": "warn",
|
|
13
|
+
"no-constant-condition": "warn",
|
|
14
|
+
"no-control-regex": "error",
|
|
15
|
+
"no-debugger": "error",
|
|
16
|
+
"no-dupe-args": "error",
|
|
17
|
+
"no-dupe-else-if": "error",
|
|
18
|
+
"no-dupe-keys": "error",
|
|
19
|
+
"no-duplicate-case": "error",
|
|
20
|
+
"no-empty": "error",
|
|
21
|
+
"no-empty-character-class": "error",
|
|
22
|
+
"no-ex-assign": "error",
|
|
23
|
+
"no-extra-boolean-cast": "off",
|
|
24
|
+
"no-extra-parens": "off",
|
|
25
|
+
"@typescript-eslint/no-extra-parens": "off",
|
|
26
|
+
"no-extra-semi": "error",
|
|
27
|
+
"no-func-assign": "error",
|
|
28
|
+
"no-import-assign": "error",
|
|
29
|
+
"no-inner-declarations": "error",
|
|
30
|
+
"no-invalid-regexp": "error",
|
|
31
|
+
"no-irregular-whitespace": "error",
|
|
32
|
+
"no-loss-of-precision": "off",
|
|
33
|
+
"@typescript-eslint/no-loss-of-precision": "error",
|
|
34
|
+
"no-misleading-character-class": "error",
|
|
35
|
+
"no-obj-calls": "error",
|
|
36
|
+
"no-promise-executor-return": "error",
|
|
37
|
+
"no-prototype-builtins": "off",
|
|
38
|
+
"no-regex-spaces": "error",
|
|
39
|
+
"no-setter-return": "off",
|
|
40
|
+
"no-sparse-arrays": "error",
|
|
41
|
+
"no-template-curly-in-string": "error",
|
|
42
|
+
"no-unexpected-multiline": "error",
|
|
43
|
+
"no-unreachable": "error",
|
|
44
|
+
"no-unreachable-loop": "error",
|
|
45
|
+
"no-unsafe-finally": "error",
|
|
46
|
+
"no-unsafe-negation": "error",
|
|
47
|
+
"no-unsafe-optional-chaining": "error",
|
|
48
|
+
"no-useless-backreference": "off",
|
|
49
|
+
"require-atomic-updates": "error",
|
|
50
|
+
"use-isnan": "error",
|
|
51
|
+
"valid-typeof": ["error", { requireStringLiterals: !0 }]
|
|
770
52
|
}, a = {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
* https://eslint.org/docs/rules/id-match
|
|
962
|
-
*/
|
|
963
|
-
"id-match": "off",
|
|
964
|
-
/**
|
|
965
|
-
* Enforce the location of arrow function bodies with implicit returns 🔧
|
|
966
|
-
* https://eslint.org/docs/rules/implicit-arrow-linebreak
|
|
967
|
-
* Disabled because it results in conflicts with Prettier
|
|
968
|
-
*/
|
|
969
|
-
"implicit-arrow-linebreak": "off",
|
|
970
|
-
/**
|
|
971
|
-
* specify whether double or single quotes should be used in JSX attributes 🔧
|
|
972
|
-
* https://eslint.org/docs/rules/jsx-quotes
|
|
973
|
-
*/
|
|
974
|
-
"jsx-quotes": "error",
|
|
975
|
-
/**
|
|
976
|
-
* enforces spacing between keys and values in object literal properties 🔧
|
|
977
|
-
* https://eslint.org/docs/rules/key-spacing
|
|
978
|
-
*/
|
|
979
|
-
"key-spacing": "error",
|
|
980
|
-
/**
|
|
981
|
-
* require a space before & after certain keywords 🔧
|
|
982
|
-
* https://eslint.style/rules/ts/keyword-spacing#ts-keyword-spacing
|
|
983
|
-
*/
|
|
984
|
-
"@stylistic/keyword-spacing": "error",
|
|
985
|
-
/**
|
|
986
|
-
* enforce position of line comments
|
|
987
|
-
* https://eslint.org/docs/rules/line-comment-position
|
|
988
|
-
*/
|
|
989
|
-
"line-comment-position": "error",
|
|
990
|
-
/**
|
|
991
|
-
* disallow mixed 'LF' and 'CRLF' as linebreaks 🔧
|
|
992
|
-
* https://eslint.org/docs/rules/linebreak-style
|
|
993
|
-
*/
|
|
994
|
-
"linebreak-style": "error",
|
|
995
|
-
/**
|
|
996
|
-
* enforces empty lines around comments 🔧
|
|
997
|
-
* https://eslint.org/docs/rules/lines-around-comment
|
|
998
|
-
*/
|
|
999
|
-
"lines-around-comment": "off",
|
|
1000
|
-
/**
|
|
1001
|
-
* require or disallow an empty line between class members 🔧
|
|
1002
|
-
* https://eslint.style/rules/ts/lines-between-class-members#ts-lines-between-class-members
|
|
1003
|
-
*/
|
|
1004
|
-
"@stylistic/lines-between-class-members": "error",
|
|
1005
|
-
/**
|
|
1006
|
-
* specify the maximum depth that blocks can be nested
|
|
1007
|
-
* https://eslint.org/docs/rules/max-depth
|
|
1008
|
-
*/
|
|
1009
|
-
"max-depth": "warn",
|
|
1010
|
-
/**
|
|
1011
|
-
* specify the maximum length of a line in your program
|
|
1012
|
-
* https://eslint.org/docs/rules/max-len
|
|
1013
|
-
*/
|
|
1014
|
-
"max-len": [
|
|
1015
|
-
"error",
|
|
1016
|
-
{
|
|
1017
|
-
code: 100,
|
|
1018
|
-
tabWidth: 2,
|
|
1019
|
-
ignoreUrls: !0,
|
|
1020
|
-
ignoreComments: !1,
|
|
1021
|
-
ignoreRegExpLiterals: !0,
|
|
1022
|
-
ignoreStrings: !0,
|
|
1023
|
-
ignoreTemplateLiterals: !0
|
|
1024
|
-
}
|
|
1025
|
-
],
|
|
1026
|
-
/**
|
|
1027
|
-
* specify the max number of lines in a file
|
|
1028
|
-
* https://eslint.org/docs/rules/max-lines
|
|
1029
|
-
*/
|
|
1030
|
-
"max-lines": "off",
|
|
1031
|
-
/**
|
|
1032
|
-
* enforce a maximum function length
|
|
1033
|
-
* https://eslint.org/docs/rules/max-lines-per-function
|
|
1034
|
-
*/
|
|
1035
|
-
"max-lines-per-function": "off",
|
|
1036
|
-
/**
|
|
1037
|
-
* specify the maximum depth callbacks can be nested
|
|
1038
|
-
* https://eslint.org/docs/rules/max-nested-callbacks
|
|
1039
|
-
*/
|
|
1040
|
-
"max-nested-callbacks": "off",
|
|
1041
|
-
/**
|
|
1042
|
-
* limits the number of parameters that can be used in the function declaration.
|
|
1043
|
-
* https://eslint.org/docs/rules/max-params
|
|
1044
|
-
*/
|
|
1045
|
-
"max-params": "off",
|
|
1046
|
-
/**
|
|
1047
|
-
* specify the maximum number of statement allowed in a function
|
|
1048
|
-
* https://eslint.org/docs/rules/max-statements
|
|
1049
|
-
*/
|
|
1050
|
-
"max-statements": "off",
|
|
1051
|
-
/**
|
|
1052
|
-
* restrict the number of statements per line
|
|
1053
|
-
* https://eslint.org/docs/rules/max-statements-per-line
|
|
1054
|
-
*/
|
|
1055
|
-
"max-statements-per-line": "off",
|
|
1056
|
-
/**
|
|
1057
|
-
* enforce a particular style for multiline comments 🔧
|
|
1058
|
-
* https://eslint.org/docs/rules/multiline-comment-style
|
|
1059
|
-
*/
|
|
1060
|
-
"multiline-comment-style": "off",
|
|
1061
|
-
/**
|
|
1062
|
-
* require multiline ternary 🔧
|
|
1063
|
-
* https://eslint.org/docs/rules/multiline-ternary
|
|
1064
|
-
*/
|
|
1065
|
-
"multiline-ternary": "off",
|
|
1066
|
-
/**
|
|
1067
|
-
* require a capital letter for constructors
|
|
1068
|
-
* https://eslint.org/docs/rules/new-cap
|
|
1069
|
-
*/
|
|
1070
|
-
"new-cap": "error",
|
|
1071
|
-
/**
|
|
1072
|
-
* disallow the omission of parentheses when invoking a constructor with no arguments 🔧
|
|
1073
|
-
* https://eslint.org/docs/rules/new-parens
|
|
1074
|
-
*/
|
|
1075
|
-
"new-parens": "error",
|
|
1076
|
-
/**
|
|
1077
|
-
* enforces new line after each method call in the chain
|
|
1078
|
-
* to make it more readable and easy to maintain 🔧
|
|
1079
|
-
* https://eslint.org/docs/rules/newline-per-chained-call
|
|
1080
|
-
*/
|
|
1081
|
-
"newline-per-chained-call": "error",
|
|
1082
|
-
/**
|
|
1083
|
-
* disallow use of the Array constructor
|
|
1084
|
-
* https://eslint.org/docs/rules/no-array-constructor
|
|
1085
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md
|
|
1086
|
-
*/
|
|
1087
|
-
"no-array-constructor": "off",
|
|
1088
|
-
"@typescript-eslint/no-array-constructor": "error",
|
|
1089
|
-
/**
|
|
1090
|
-
* disallow use of bitwise operators
|
|
1091
|
-
* https://eslint.org/docs/rules/no-bitwise
|
|
1092
|
-
*/
|
|
1093
|
-
"no-bitwise": "warn",
|
|
1094
|
-
/**
|
|
1095
|
-
* disallow use of the continue statement
|
|
1096
|
-
* https://eslint.org/docs/rules/no-continue
|
|
1097
|
-
*/
|
|
1098
|
-
"no-continue": "error",
|
|
1099
|
-
/**
|
|
1100
|
-
* disallow comments inline after code
|
|
1101
|
-
* https://eslint.org/docs/rules/no-inline-comments
|
|
1102
|
-
*/
|
|
1103
|
-
"no-inline-comments": "error",
|
|
1104
|
-
/**
|
|
1105
|
-
* disallow if as the only statement in an else block 🔧
|
|
1106
|
-
* https://eslint.org/docs/rules/no-lonely-if
|
|
1107
|
-
*/
|
|
1108
|
-
"no-lonely-if": "error",
|
|
1109
|
-
/**
|
|
1110
|
-
* disallow un-paren'd mixes of different operators
|
|
1111
|
-
* https://eslint.org/docs/rules/no-mixed-operators
|
|
1112
|
-
*/
|
|
1113
|
-
"no-mixed-operators": "error",
|
|
1114
|
-
/**
|
|
1115
|
-
* disallow mixed spaces and tabs for indentation ✅
|
|
1116
|
-
* https://eslint.org/docs/rules/no-mixed-spaces-and-tabs
|
|
1117
|
-
*/
|
|
1118
|
-
"no-mixed-spaces-and-tabs": "error",
|
|
1119
|
-
/**
|
|
1120
|
-
* disallow use of chained assignment expressions
|
|
1121
|
-
* https://eslint.org/docs/rules/no-multi-assign
|
|
1122
|
-
*/
|
|
1123
|
-
"no-multi-assign": "error",
|
|
1124
|
-
/**
|
|
1125
|
-
* disallow multiple empty lines, only one newline at the end, and no new lines at the beginning 🔧
|
|
1126
|
-
* https://eslint.org/docs/rules/no-multiple-empty-lines
|
|
1127
|
-
*/
|
|
1128
|
-
"no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
1129
|
-
/**
|
|
1130
|
-
* disallow negated conditions
|
|
1131
|
-
* https://eslint.org/docs/rules/no-negated-condition
|
|
1132
|
-
*/
|
|
1133
|
-
"no-negated-condition": "off",
|
|
1134
|
-
/**
|
|
1135
|
-
* disallow nested ternary expressions
|
|
1136
|
-
* https://eslint.org/docs/rules/no-nested-ternary
|
|
1137
|
-
*/
|
|
1138
|
-
"no-nested-ternary": "error",
|
|
1139
|
-
/**
|
|
1140
|
-
* disallow use of the Object constructor
|
|
1141
|
-
* https://eslint.org/docs/rules/no-new-object
|
|
1142
|
-
*/
|
|
1143
|
-
"no-new-object": "error",
|
|
1144
|
-
/**
|
|
1145
|
-
* disallow use of unary operators, ++ and --
|
|
1146
|
-
* https://eslint.org/docs/rules/no-plusplus
|
|
1147
|
-
*/
|
|
1148
|
-
"no-plusplus": "error",
|
|
1149
|
-
/**
|
|
1150
|
-
* disallow certain syntax forms
|
|
1151
|
-
* https://eslint.org/docs/rules/no-restricted-syntax
|
|
1152
|
-
*/
|
|
1153
|
-
"no-restricted-syntax": [
|
|
1154
|
-
"error",
|
|
1155
|
-
{
|
|
1156
|
-
selector: "ForInStatement",
|
|
1157
|
-
message: "for-in loops are disallowed. (https://github.com/SPSCommerce/javascript#iterators--no-for-in)"
|
|
1158
|
-
},
|
|
1159
|
-
{
|
|
1160
|
-
selector: "LabeledStatement",
|
|
1161
|
-
message: "Labeled statements are disallowed. (https://github.com/SPSCommerce/javascript#control-statements--value-selection)"
|
|
1162
|
-
}
|
|
1163
|
-
],
|
|
1164
|
-
/**
|
|
1165
|
-
* disallow tab characters entirely
|
|
1166
|
-
* https://eslint.org/docs/rules/no-tabs
|
|
1167
|
-
*/
|
|
1168
|
-
"no-tabs": "error",
|
|
1169
|
-
/**
|
|
1170
|
-
* disallow the use of ternary operators
|
|
1171
|
-
* https://eslint.org/docs/rules/no-ternary
|
|
1172
|
-
*/
|
|
1173
|
-
"no-ternary": "off",
|
|
1174
|
-
/**
|
|
1175
|
-
* disallow trailing whitespace at the end of lines 🔧
|
|
1176
|
-
* https://eslint.org/docs/rules/no-trailing-spaces
|
|
1177
|
-
*/
|
|
1178
|
-
"no-trailing-spaces": "error",
|
|
1179
|
-
/**
|
|
1180
|
-
* disallow dangling underscores in identifiers
|
|
1181
|
-
* https://eslint.org/docs/rules/no-underscore-dangle
|
|
1182
|
-
*/
|
|
1183
|
-
"no-underscore-dangle": ["error", { enforceInMethodNames: !0 }],
|
|
1184
|
-
/**
|
|
1185
|
-
* prefer `a || b` over `a ? a : b` 🔧
|
|
1186
|
-
* https://eslint.org/docs/rules/no-unneeded-ternary
|
|
1187
|
-
*/
|
|
1188
|
-
"no-unneeded-ternary": ["error", { defaultAssignment: !1 }],
|
|
1189
|
-
/**
|
|
1190
|
-
* disallow whitespace before properties 🔧
|
|
1191
|
-
* https://eslint.org/docs/rules/no-whitespace-before-property
|
|
1192
|
-
*/
|
|
1193
|
-
"no-whitespace-before-property": "error",
|
|
1194
|
-
/**
|
|
1195
|
-
* enforce the location of single-line statements 🔧
|
|
1196
|
-
* https://eslint.org/docs/rules/nonblock-statement-body-position
|
|
1197
|
-
*/
|
|
1198
|
-
"nonblock-statement-body-position": "error",
|
|
1199
|
-
/**
|
|
1200
|
-
* enforce line breaks between braces 🔧
|
|
1201
|
-
* https://eslint.org/docs/rules/object-curly-newline
|
|
1202
|
-
*/
|
|
1203
|
-
"object-curly-newline": "off",
|
|
1204
|
-
/**
|
|
1205
|
-
* require padding inside curly braces 🔧
|
|
1206
|
-
* https://eslint.style/rules/ts/object-curly-spacing#ts-object-curly-spacing
|
|
1207
|
-
*/
|
|
1208
|
-
"@stylistic/object-curly-spacing": ["error", "always"],
|
|
1209
|
-
/**
|
|
1210
|
-
* enforce "same line" or "multiple line" on object properties. 🔧
|
|
1211
|
-
* https://eslint.org/docs/rules/object-property-newline
|
|
1212
|
-
*/
|
|
1213
|
-
"object-property-newline": ["error", { allowAllPropertiesOnSameLine: !0 }],
|
|
1214
|
-
/**
|
|
1215
|
-
* allow just one variable declaration per function 🔧
|
|
1216
|
-
* https://eslint.org/docs/rules/one-var
|
|
1217
|
-
* nb: despite 'var' being in the name, does apply to let and const
|
|
1218
|
-
*/
|
|
1219
|
-
"one-var": ["error", "never"],
|
|
1220
|
-
/**
|
|
1221
|
-
* require a newline around variable declaration 🔧
|
|
1222
|
-
* https://eslint.org/docs/rules/one-var-declaration-per-line
|
|
1223
|
-
*/
|
|
1224
|
-
"one-var-declaration-per-line": ["error", "always"],
|
|
1225
|
-
/**
|
|
1226
|
-
* require assignment operator shorthand where possible or prohibit it entirely 🔧
|
|
1227
|
-
* https://eslint.org/docs/rules/operator-assignment
|
|
1228
|
-
*/
|
|
1229
|
-
"operator-assignment": "error",
|
|
1230
|
-
/**
|
|
1231
|
-
* Requires operator at the beginning of the line in multiline statements 🔧
|
|
1232
|
-
* https://eslint.org/docs/rules/operator-linebreak
|
|
1233
|
-
* Disabled because it results in conflicts with Prettier
|
|
1234
|
-
*/
|
|
1235
|
-
"operator-linebreak": "off",
|
|
1236
|
-
/**
|
|
1237
|
-
* disallow padding within blocks 🔧
|
|
1238
|
-
* https://eslint.org/docs/rules/padded-blocks
|
|
1239
|
-
*/
|
|
1240
|
-
"padded-blocks": [
|
|
1241
|
-
"error",
|
|
1242
|
-
{
|
|
1243
|
-
blocks: "never",
|
|
1244
|
-
classes: "never",
|
|
1245
|
-
switches: "never"
|
|
1246
|
-
},
|
|
1247
|
-
{
|
|
1248
|
-
allowSingleLineBlocks: !0
|
|
1249
|
-
}
|
|
1250
|
-
],
|
|
1251
|
-
/**
|
|
1252
|
-
* Require or disallow padding lines between statements 🔧
|
|
1253
|
-
* https://eslint.org/docs/rules/padding-line-between-statements
|
|
1254
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/padding-line-between-statements.md
|
|
1255
|
-
*/
|
|
1256
|
-
"padding-line-between-statements": "off",
|
|
1257
|
-
"@typescript-eslint/padding-line-between-statements": "off",
|
|
1258
|
-
/**
|
|
1259
|
-
* Disallow the use of Math.pow in favor of the ** operator 🔧
|
|
1260
|
-
* https://eslint.org/docs/rules/prefer-exponentiation-operator
|
|
1261
|
-
*/
|
|
1262
|
-
"prefer-exponentiation-operator": "off",
|
|
1263
|
-
/**
|
|
1264
|
-
* Prefer use of an object spread over Object.assign 🔧
|
|
1265
|
-
* https://eslint.org/docs/rules/prefer-object-spread
|
|
1266
|
-
*/
|
|
1267
|
-
"prefer-object-spread": "error",
|
|
1268
|
-
/**
|
|
1269
|
-
* require quotes around object literal property names 🔧
|
|
1270
|
-
* https://eslint.org/docs/rules/quote-props
|
|
1271
|
-
*/
|
|
1272
|
-
"quote-props": [
|
|
1273
|
-
"error",
|
|
1274
|
-
"as-needed",
|
|
1275
|
-
{ keywords: !1, numbers: !1 }
|
|
1276
|
-
],
|
|
1277
|
-
/**
|
|
1278
|
-
* specify whether double or single quotes should be used 🔧
|
|
1279
|
-
* https://eslint.style/rules/ts/quotes#ts-quotes
|
|
1280
|
-
*/
|
|
1281
|
-
"@stylistic/quotes": [
|
|
1282
|
-
"error",
|
|
1283
|
-
"double",
|
|
1284
|
-
{ avoidEscape: !0 }
|
|
1285
|
-
],
|
|
1286
|
-
/**
|
|
1287
|
-
* require or disallow use of semicolons instead of ASI 🔧
|
|
1288
|
-
* https://eslint.style/rules/ts/semi#ts-semi
|
|
1289
|
-
*/
|
|
1290
|
-
"@stylistic/semi": "error",
|
|
1291
|
-
/**
|
|
1292
|
-
* enforce spacing before and after semicolons 🔧
|
|
1293
|
-
* https://eslint.org/docs/rules/semi-spacing
|
|
1294
|
-
*/
|
|
1295
|
-
"semi-spacing": "error",
|
|
1296
|
-
/**
|
|
1297
|
-
* Enforce location of semicolons 🔧
|
|
1298
|
-
* https://eslint.org/docs/rules/semi-style
|
|
1299
|
-
*/
|
|
1300
|
-
"semi-style": "error",
|
|
1301
|
-
/**
|
|
1302
|
-
* requires object keys to be sorted
|
|
1303
|
-
* https://eslint.org/docs/rules/sort-keys
|
|
1304
|
-
*/
|
|
1305
|
-
"sort-keys": "off",
|
|
1306
|
-
/**
|
|
1307
|
-
* sort variables within the same declaration block 🔧
|
|
1308
|
-
* https://eslint.org/docs/rules/sort-vars
|
|
1309
|
-
*/
|
|
1310
|
-
"sort-vars": "off",
|
|
1311
|
-
/**
|
|
1312
|
-
* require or disallow space before blocks 🔧
|
|
1313
|
-
* https://eslint.org/docs/rules/space-before-blocks
|
|
1314
|
-
*/
|
|
1315
|
-
"space-before-blocks": "error",
|
|
1316
|
-
/**
|
|
1317
|
-
* require or disallow space before function opening parenthesis 🔧
|
|
1318
|
-
* https://eslint.style/rules/ts/space-before-function-paren#ts-space-before-function-paren
|
|
1319
|
-
*/
|
|
1320
|
-
"@stylistic/space-before-function-paren": [
|
|
1321
|
-
"error",
|
|
1322
|
-
{
|
|
1323
|
-
anonymous: "always",
|
|
1324
|
-
named: "never",
|
|
1325
|
-
asyncArrow: "always"
|
|
1326
|
-
}
|
|
1327
|
-
],
|
|
1328
|
-
/**
|
|
1329
|
-
* require or disallow spaces inside parentheses 🔧
|
|
1330
|
-
* https://eslint.org/docs/rules/space-in-parens
|
|
1331
|
-
*/
|
|
1332
|
-
"space-in-parens": "error",
|
|
1333
|
-
/**
|
|
1334
|
-
* require spaces around operators 🔧
|
|
1335
|
-
* https://eslint.style/rules/ts/space-infix-ops#ts-space-infix-ops
|
|
1336
|
-
*/
|
|
1337
|
-
"@stylistic/space-infix-ops": "error",
|
|
1338
|
-
/**
|
|
1339
|
-
* Require or disallow spaces before/after unary operators 🔧
|
|
1340
|
-
* https://eslint.org/docs/rules/space-unary-ops
|
|
1341
|
-
*/
|
|
1342
|
-
"space-unary-ops": "error",
|
|
1343
|
-
/**
|
|
1344
|
-
* require or disallow a space immediately following the // or /* in a comment 🔧
|
|
1345
|
-
* https://eslint.org/docs/rules/spaced-comment
|
|
1346
|
-
*/
|
|
1347
|
-
"spaced-comment": "error",
|
|
1348
|
-
/**
|
|
1349
|
-
* Enforce spacing around colons of switch statements 🔧
|
|
1350
|
-
* https://eslint.org/docs/rules/switch-colon-spacing
|
|
1351
|
-
*/
|
|
1352
|
-
"switch-colon-spacing": "error",
|
|
1353
|
-
/**
|
|
1354
|
-
* Require or disallow spacing between template tags and their literals 🔧
|
|
1355
|
-
* https://eslint.org/docs/rules/template-tag-spacing
|
|
1356
|
-
*/
|
|
1357
|
-
"template-tag-spacing": "error",
|
|
1358
|
-
/**
|
|
1359
|
-
* require or disallow the Unicode Byte Order Mark 🔧
|
|
1360
|
-
* https://eslint.org/docs/rules/unicode-bom
|
|
1361
|
-
*/
|
|
1362
|
-
"unicode-bom": "error",
|
|
1363
|
-
/**
|
|
1364
|
-
* require regex literals to be wrapped in parentheses 🔧
|
|
1365
|
-
* https://eslint.org/docs/rules/wrap-regex
|
|
1366
|
-
*/
|
|
1367
|
-
"wrap-regex": "off"
|
|
1368
|
-
}, l = {
|
|
1369
|
-
/**
|
|
1370
|
-
* enforces no braces where they can be omitted 🔧
|
|
1371
|
-
* https://eslint.org/docs/rules/arrow-body-style
|
|
1372
|
-
*/
|
|
1373
|
-
"arrow-body-style": "error",
|
|
1374
|
-
/**
|
|
1375
|
-
* require parens in arrow function arguments 🔧
|
|
1376
|
-
* https://eslint.org/docs/rules/arrow-parens
|
|
1377
|
-
*/
|
|
1378
|
-
"arrow-parens": "error",
|
|
1379
|
-
/**
|
|
1380
|
-
* require space before/after arrow function's arrow 🔧
|
|
1381
|
-
* https://eslint.org/docs/rules/arrow-spacing
|
|
1382
|
-
*/
|
|
1383
|
-
"arrow-spacing": "error",
|
|
1384
|
-
/**
|
|
1385
|
-
* verify super() callings in constructors ✅
|
|
1386
|
-
* https://eslint.org/docs/rules/constructor-super
|
|
1387
|
-
*/
|
|
1388
|
-
"constructor-super": "error",
|
|
1389
|
-
/**
|
|
1390
|
-
* enforce the spacing around the * in generator functions 🔧
|
|
1391
|
-
* https://eslint.org/docs/rules/generator-star-spacing
|
|
1392
|
-
*/
|
|
1393
|
-
"generator-star-spacing": ["error", { before: !1, after: !0 }],
|
|
1394
|
-
/**
|
|
1395
|
-
* enforce logical assignment operators
|
|
1396
|
-
* https://eslint.org/docs/rules/logical-assignment-operators
|
|
1397
|
-
*/
|
|
1398
|
-
"logical-assignment-operators": "error",
|
|
1399
|
-
/**
|
|
1400
|
-
* disallow modifying variables of class declarations ✅
|
|
1401
|
-
* https://eslint.org/docs/rules/no-class-assign
|
|
1402
|
-
*/
|
|
1403
|
-
"no-class-assign": "error",
|
|
1404
|
-
/**
|
|
1405
|
-
* disallow arrow functions where they could be confused with comparisons 🔧
|
|
1406
|
-
* https://eslint.org/docs/rules/no-confusing-arrow
|
|
1407
|
-
*/
|
|
1408
|
-
"no-confusing-arrow": ["error", { allowParens: !0 }],
|
|
1409
|
-
/**
|
|
1410
|
-
* disallow modifying variables that are declared using const ✅
|
|
1411
|
-
* https://eslint.org/docs/rules/no-const-assign
|
|
1412
|
-
*/
|
|
1413
|
-
"no-const-assign": "error",
|
|
1414
|
-
/**
|
|
1415
|
-
* disallow duplicate class members ✅
|
|
1416
|
-
* https://eslint.org/docs/rules/no-dupe-class-members
|
|
1417
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dupe-class-members.md
|
|
1418
|
-
*/
|
|
1419
|
-
"no-dupe-class-members": "off",
|
|
1420
|
-
"@typescript-eslint/no-dupe-class-members": "error",
|
|
1421
|
-
/**
|
|
1422
|
-
* disallow importing from the same path more than once
|
|
1423
|
-
* https://eslint.org/docs/rules/no-duplicate-imports
|
|
1424
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-duplicate-imports.md
|
|
1425
|
-
* superceded by eslint-plugin-import
|
|
1426
|
-
*/
|
|
1427
|
-
"no-duplicate-import": "off",
|
|
1428
|
-
"no-duplicate-imports": "off",
|
|
1429
|
-
/**
|
|
1430
|
-
* disallow symbol constructor ✅
|
|
1431
|
-
* https://eslint.org/docs/rules/no-new-symbol
|
|
1432
|
-
*/
|
|
1433
|
-
"no-new-symbol": "error",
|
|
1434
|
-
/**
|
|
1435
|
-
* Disallow specified names in exports
|
|
1436
|
-
* https://eslint.org/docs/rules/no-restricted-exports
|
|
1437
|
-
*/
|
|
1438
|
-
"no-restricted-exports": "off",
|
|
1439
|
-
/**
|
|
1440
|
-
* disallow specific imports
|
|
1441
|
-
* https://eslint.org/docs/rules/no-restricted-imports
|
|
1442
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-restricted-imports.md
|
|
1443
|
-
*/
|
|
1444
|
-
"no-restricted-imports": "off",
|
|
1445
|
-
"@typescript-eslint/no-restricted-imports": "off",
|
|
1446
|
-
/**
|
|
1447
|
-
* disallow to use this/super before super() calling in constructors. ✅
|
|
1448
|
-
* https://eslint.org/docs/rules/no-this-before-super
|
|
1449
|
-
*/
|
|
1450
|
-
"no-this-before-super": "error",
|
|
1451
|
-
/**
|
|
1452
|
-
* disallow useless computed property keys 🔧
|
|
1453
|
-
* https://eslint.org/docs/rules/no-useless-computed-key
|
|
1454
|
-
*/
|
|
1455
|
-
"no-useless-computed-key": "error",
|
|
1456
|
-
/**
|
|
1457
|
-
* disallow unnecessary constructor
|
|
1458
|
-
* https://eslint.org/docs/rules/no-useless-constructor
|
|
1459
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md
|
|
1460
|
-
*/
|
|
1461
|
-
"no-useless-constructor": "off",
|
|
1462
|
-
"@typescript-eslint/no-useless-constructor": "error",
|
|
1463
|
-
/**
|
|
1464
|
-
* disallow renaming import, export, and destructured assignments to the same name 🔧
|
|
1465
|
-
* https://eslint.org/docs/rules/no-useless-rename
|
|
1466
|
-
*/
|
|
1467
|
-
"no-useless-rename": "error",
|
|
1468
|
-
/**
|
|
1469
|
-
* require let or const instead of var 🔧
|
|
1470
|
-
* https://eslint.org/docs/rules/no-var
|
|
1471
|
-
*/
|
|
1472
|
-
"no-var": "error",
|
|
1473
|
-
/**
|
|
1474
|
-
* require method and property shorthand syntax for object literals 🔧
|
|
1475
|
-
* https://eslint.org/docs/rules/object-shorthand
|
|
1476
|
-
*/
|
|
1477
|
-
"object-shorthand": [
|
|
1478
|
-
"error",
|
|
1479
|
-
"always",
|
|
1480
|
-
{ avoidQuotes: !0 }
|
|
1481
|
-
],
|
|
1482
|
-
/**
|
|
1483
|
-
* suggest using arrow functions as callbacks 🔧
|
|
1484
|
-
* https://eslint.org/docs/rules/prefer-arrow-callback
|
|
1485
|
-
*/
|
|
1486
|
-
"prefer-arrow-callback": "error",
|
|
1487
|
-
/**
|
|
1488
|
-
* suggest using of const declaration for variables that are never modified after declared 🔧
|
|
1489
|
-
* https://eslint.org/docs/rules/prefer-const
|
|
1490
|
-
*/
|
|
1491
|
-
"prefer-const": ["error", { ignoreReadBeforeAssign: !0 }],
|
|
1492
|
-
/**
|
|
1493
|
-
* Prefer destructuring from arrays and objects 🔧
|
|
1494
|
-
* https://eslint.org/docs/rules/prefer-destructuring
|
|
1495
|
-
*/
|
|
1496
|
-
"prefer-destructuring": [
|
|
1497
|
-
"error",
|
|
1498
|
-
{
|
|
1499
|
-
VariableDeclarator: {
|
|
1500
|
-
array: !1,
|
|
1501
|
-
object: !0
|
|
1502
|
-
},
|
|
1503
|
-
AssignmentExpression: {
|
|
1504
|
-
array: !0,
|
|
1505
|
-
object: !1
|
|
1506
|
-
}
|
|
1507
|
-
},
|
|
1508
|
-
{
|
|
1509
|
-
enforceForRenamedProperties: !1
|
|
1510
|
-
}
|
|
1511
|
-
],
|
|
1512
|
-
/**
|
|
1513
|
-
* prefer exponentiation operator
|
|
1514
|
-
* https://eslint.org/docs/rules/prefer-exponentiation-operator
|
|
1515
|
-
*/
|
|
1516
|
-
"prefer-exponentiation-operator": "error",
|
|
1517
|
-
/**
|
|
1518
|
-
* disallow parseInt() in favor of binary, octal, and hexadecimal literals 🔧
|
|
1519
|
-
* https://eslint.org/docs/rules/prefer-numeric-literals
|
|
1520
|
-
*/
|
|
1521
|
-
"prefer-numeric-literals": "error",
|
|
1522
|
-
/**
|
|
1523
|
-
* suggest using Reflect methods where applicable
|
|
1524
|
-
* https://eslint.org/docs/rules/prefer-reflect
|
|
1525
|
-
*/
|
|
1526
|
-
"prefer-reflect": "off",
|
|
1527
|
-
/**
|
|
1528
|
-
* use rest parameters instead of arguments
|
|
1529
|
-
* https://eslint.org/docs/rules/prefer-rest-params
|
|
1530
|
-
*/
|
|
1531
|
-
"prefer-rest-params": "error",
|
|
1532
|
-
/**
|
|
1533
|
-
* suggest using the spread syntax instead of .apply()
|
|
1534
|
-
* https://eslint.org/docs/rules/prefer-spread
|
|
1535
|
-
*/
|
|
1536
|
-
"prefer-spread": "error",
|
|
1537
|
-
/**
|
|
1538
|
-
* suggest using template literals instead of string concatenation 🔧
|
|
1539
|
-
* https://eslint.org/docs/rules/prefer-template
|
|
1540
|
-
*/
|
|
1541
|
-
"prefer-template": "error",
|
|
1542
|
-
/**
|
|
1543
|
-
* disallow generator functions that do not have yield ✅
|
|
1544
|
-
* https://eslint.org/docs/rules/require-yield
|
|
1545
|
-
*/
|
|
1546
|
-
"require-yield": "error",
|
|
1547
|
-
/**
|
|
1548
|
-
* enforce spacing between object rest-spread 🔧
|
|
1549
|
-
* https://eslint.org/docs/rules/rest-spread-spacing
|
|
1550
|
-
*/
|
|
1551
|
-
"rest-spread-spacing": "error",
|
|
1552
|
-
/**
|
|
1553
|
-
* import sorting 🔧
|
|
1554
|
-
* https://eslint.org/docs/rules/sort-imports
|
|
1555
|
-
*/
|
|
1556
|
-
"sort-imports": "off",
|
|
1557
|
-
/**
|
|
1558
|
-
* require a Symbol description
|
|
1559
|
-
* https://eslint.org/docs/rules/symbol-description
|
|
1560
|
-
*/
|
|
1561
|
-
"symbol-description": "error",
|
|
1562
|
-
/**
|
|
1563
|
-
* enforce usage of spacing in template strings 🔧
|
|
1564
|
-
* https://eslint.org/docs/rules/template-curly-spacing
|
|
1565
|
-
*/
|
|
1566
|
-
"template-curly-spacing": "error",
|
|
1567
|
-
/**
|
|
1568
|
-
* enforce spacing around the * in yield* expressions 🔧
|
|
1569
|
-
* https://eslint.org/docs/rules/yield-star-spacing
|
|
1570
|
-
*/
|
|
1571
|
-
"yield-star-spacing": "error"
|
|
53
|
+
"accessor-pairs": "off",
|
|
54
|
+
"array-callback-return": ["error", { allowImplicit: !0 }],
|
|
55
|
+
"block-scoped-var": "off",
|
|
56
|
+
complexity: "off",
|
|
57
|
+
"class-methods-use-this": "error",
|
|
58
|
+
"consistent-return": "off",
|
|
59
|
+
curly: ["error", "multi-line"],
|
|
60
|
+
"default-case": ["error", { commentPattern: "^no default$" }],
|
|
61
|
+
"default-case-last": "error",
|
|
62
|
+
"default-param-last": "off",
|
|
63
|
+
"@typescript-eslint/default-param-last": "error",
|
|
64
|
+
"dot-location": ["error", "property"],
|
|
65
|
+
"dot-notation": "off",
|
|
66
|
+
"@typescript-eslint/dot-notation": ["error", { allowKeywords: !0 }],
|
|
67
|
+
eqeqeq: [
|
|
68
|
+
"error",
|
|
69
|
+
"always",
|
|
70
|
+
{ null: "ignore" }
|
|
71
|
+
],
|
|
72
|
+
"grouped-accessor-pairs": "off",
|
|
73
|
+
"guard-for-in": "off",
|
|
74
|
+
"max-classes-per-file": ["error", 1],
|
|
75
|
+
"no-alert": "error",
|
|
76
|
+
"no-caller": "error",
|
|
77
|
+
"no-case-declarations": "error",
|
|
78
|
+
"no-constructor-return": "error",
|
|
79
|
+
"no-div-regex": "off",
|
|
80
|
+
"no-else-return": "off",
|
|
81
|
+
"no-empty-function": "off",
|
|
82
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
83
|
+
"no-empty-pattern": "error",
|
|
84
|
+
"no-eq-null": "off",
|
|
85
|
+
"no-eval": "error",
|
|
86
|
+
"no-extend-native": "error",
|
|
87
|
+
"no-extra-bind": "error",
|
|
88
|
+
"no-extra-label": "error",
|
|
89
|
+
"no-fallthrough": "error",
|
|
90
|
+
"no-floating-decimal": "error",
|
|
91
|
+
"no-global-assign": "error",
|
|
92
|
+
"no-implicit-coercion": ["error", {
|
|
93
|
+
boolean: !1,
|
|
94
|
+
number: !0,
|
|
95
|
+
string: !0
|
|
96
|
+
}],
|
|
97
|
+
"no-implicit-globals": "off",
|
|
98
|
+
"no-implied-eval": "off",
|
|
99
|
+
"@typescript-eslint/no-implied-eval": "error",
|
|
100
|
+
"no-import-assign": "error",
|
|
101
|
+
"no-invalid-this": "off",
|
|
102
|
+
"@typescript-eslint/no-invalid-this": "off",
|
|
103
|
+
"no-iterator": "error",
|
|
104
|
+
"no-labels": "error",
|
|
105
|
+
"no-lone-blocks": "error",
|
|
106
|
+
"no-loop-func": "off",
|
|
107
|
+
"@typescript-eslint/no-loop-func": "error",
|
|
108
|
+
"no-magic-numbers": "off",
|
|
109
|
+
"@typescript-eslint/no-magic-numbers": ["error", {
|
|
110
|
+
ignore: [
|
|
111
|
+
-1,
|
|
112
|
+
0,
|
|
113
|
+
1,
|
|
114
|
+
2
|
|
115
|
+
],
|
|
116
|
+
ignoreArrayIndexes: !0
|
|
117
|
+
}],
|
|
118
|
+
"no-multi-spaces": "error",
|
|
119
|
+
"no-multi-str": "error",
|
|
120
|
+
"no-new": "error",
|
|
121
|
+
"no-new-func": "error",
|
|
122
|
+
"no-new-wrappers": "error",
|
|
123
|
+
"no-nonoctal-decimal-escape": "error",
|
|
124
|
+
"no-octal": "error",
|
|
125
|
+
"no-octal-escape": "error",
|
|
126
|
+
"no-param-reassign": ["error", {
|
|
127
|
+
props: !0,
|
|
128
|
+
ignorePropertyModificationsFor: ["acc", "accumulator"]
|
|
129
|
+
}],
|
|
130
|
+
"no-proto": "error",
|
|
131
|
+
"no-redeclare": "off",
|
|
132
|
+
"@typescript-eslint/no-redeclare": "error",
|
|
133
|
+
"no-restricted-properties": [
|
|
134
|
+
"error",
|
|
135
|
+
{
|
|
136
|
+
object: "arguments",
|
|
137
|
+
property: "callee",
|
|
138
|
+
message: "arguments.callee is deprecated"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
object: "global",
|
|
142
|
+
property: "isFinite",
|
|
143
|
+
message: "Please use Number.isFinite instead"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
object: "self",
|
|
147
|
+
property: "isFinite",
|
|
148
|
+
message: "Please use Number.isFinite instead"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
object: "window",
|
|
152
|
+
property: "isFinite",
|
|
153
|
+
message: "Please use Number.isFinite instead"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
object: "global",
|
|
157
|
+
property: "isNaN",
|
|
158
|
+
message: "Please use Number.isNaN instead"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
object: "self",
|
|
162
|
+
property: "isNaN",
|
|
163
|
+
message: "Please use Number.isNaN instead"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
object: "window",
|
|
167
|
+
property: "isNaN",
|
|
168
|
+
message: "Please use Number.isNaN instead"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
property: "__defineGetter__",
|
|
172
|
+
message: "Please use Object.defineProperty instead."
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
property: "__defineSetter__",
|
|
176
|
+
message: "Please use Object.defineProperty instead."
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"no-return-assign": "error",
|
|
180
|
+
"no-return-await": "off",
|
|
181
|
+
"@typescript-eslint/return-await": "error",
|
|
182
|
+
"no-script-url": "error",
|
|
183
|
+
"no-self-assign": "error",
|
|
184
|
+
"no-self-compare": "error",
|
|
185
|
+
"no-sequences": "error",
|
|
186
|
+
"no-throw-literal": "off",
|
|
187
|
+
"@typescript-eslint/only-throw-error": "error",
|
|
188
|
+
"no-unmodified-loop-condition": "off",
|
|
189
|
+
"no-unused-expressions": "off",
|
|
190
|
+
"@typescript-eslint/no-unused-expressions": ["error", { allowTaggedTemplates: !1 }],
|
|
191
|
+
"no-unused-labels": "error",
|
|
192
|
+
"no-useless-backreference": "error",
|
|
193
|
+
"no-useless-call": "off",
|
|
194
|
+
"no-useless-catch": "error",
|
|
195
|
+
"no-useless-concat": "error",
|
|
196
|
+
"no-useless-escape": "error",
|
|
197
|
+
"no-useless-return": "error",
|
|
198
|
+
"no-void": ["error", { allowAsStatement: !0 }],
|
|
199
|
+
"no-warning-comments": "off",
|
|
200
|
+
"no-with": "error",
|
|
201
|
+
"prefer-object-has-own": "error",
|
|
202
|
+
"prefer-promise-reject-errors": ["error", { allowEmptyReject: !0 }],
|
|
203
|
+
"prefer-named-capture-group": "off",
|
|
204
|
+
"prefer-regex-literals": "error",
|
|
205
|
+
radix: "error",
|
|
206
|
+
"require-await": "off",
|
|
207
|
+
"@typescript-eslint/require-await": "off",
|
|
208
|
+
"require-unicode-regexp": "off",
|
|
209
|
+
"vars-on-top": "off",
|
|
210
|
+
"wrap-iife": [
|
|
211
|
+
"error",
|
|
212
|
+
"outside",
|
|
213
|
+
{ functionPrototypeMethods: !1 }
|
|
214
|
+
],
|
|
215
|
+
yoda: "error"
|
|
216
|
+
}, o = { strict: ["error", "never"] }, s = {
|
|
217
|
+
"init-declarations": "off",
|
|
218
|
+
"@typescript-eslint/init-declarations": "off",
|
|
219
|
+
"no-catch-shadow": "off",
|
|
220
|
+
"no-delete-var": "error",
|
|
221
|
+
"no-label-var": "error",
|
|
222
|
+
"no-restricted-globals": [
|
|
223
|
+
"error",
|
|
224
|
+
{
|
|
225
|
+
name: "isFinite",
|
|
226
|
+
message: "Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: "isNaN",
|
|
230
|
+
message: "Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"no-shadow": "off",
|
|
234
|
+
"@typescript-eslint/no-shadow": "error",
|
|
235
|
+
"no-shadow-restricted-names": "error",
|
|
236
|
+
"no-undef": "error",
|
|
237
|
+
"no-undef-init": "error",
|
|
238
|
+
"no-undefined": "off",
|
|
239
|
+
"no-unused-vars": "off",
|
|
240
|
+
"@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: !0 }],
|
|
241
|
+
"no-use-before-define": "off",
|
|
242
|
+
"@typescript-eslint/no-use-before-define": "error"
|
|
1572
243
|
}, c = {
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
244
|
+
"array-bracket-newline": ["error", "consistent"],
|
|
245
|
+
"array-bracket-spacing": ["error", "never"],
|
|
246
|
+
"block-spacing": ["error", "always"],
|
|
247
|
+
"@stylistic/brace-style": "error",
|
|
248
|
+
camelcase: ["error", { properties: "never" }],
|
|
249
|
+
"capitalized-comments": "off",
|
|
250
|
+
"@stylistic/comma-dangle": ["error", "always-multiline"],
|
|
251
|
+
"@stylistic/comma-spacing": "error",
|
|
252
|
+
"comma-style": "error",
|
|
253
|
+
"computed-property-spacing": "error",
|
|
254
|
+
"consistent-this": "off",
|
|
255
|
+
"eol-last": "error",
|
|
256
|
+
"@stylistic/function-call-spacing": "error",
|
|
257
|
+
"func-name-matching": "off",
|
|
258
|
+
"func-names": "off",
|
|
259
|
+
"func-style": ["off", "expression"],
|
|
260
|
+
"function-call-argument-newline": ["off", "consistent"],
|
|
261
|
+
"function-paren-newline": "off",
|
|
262
|
+
"id-blacklist": "off",
|
|
263
|
+
"id-denylist": "off",
|
|
264
|
+
"id-length": "off",
|
|
265
|
+
"id-match": "off",
|
|
266
|
+
"implicit-arrow-linebreak": "off",
|
|
267
|
+
"jsx-quotes": "error",
|
|
268
|
+
"key-spacing": "error",
|
|
269
|
+
"@stylistic/keyword-spacing": "error",
|
|
270
|
+
"line-comment-position": "error",
|
|
271
|
+
"linebreak-style": "error",
|
|
272
|
+
"lines-around-comment": "off",
|
|
273
|
+
"@stylistic/lines-between-class-members": "error",
|
|
274
|
+
"max-depth": "warn",
|
|
275
|
+
"max-len": ["error", {
|
|
276
|
+
code: 100,
|
|
277
|
+
tabWidth: 2,
|
|
278
|
+
ignoreUrls: !0,
|
|
279
|
+
ignoreComments: !1,
|
|
280
|
+
ignoreRegExpLiterals: !0,
|
|
281
|
+
ignoreStrings: !0,
|
|
282
|
+
ignoreTemplateLiterals: !0
|
|
283
|
+
}],
|
|
284
|
+
"max-lines": "off",
|
|
285
|
+
"max-lines-per-function": "off",
|
|
286
|
+
"max-nested-callbacks": "off",
|
|
287
|
+
"max-params": "off",
|
|
288
|
+
"max-statements": "off",
|
|
289
|
+
"max-statements-per-line": "off",
|
|
290
|
+
"multiline-comment-style": "off",
|
|
291
|
+
"multiline-ternary": "off",
|
|
292
|
+
"new-cap": "error",
|
|
293
|
+
"new-parens": "error",
|
|
294
|
+
"newline-per-chained-call": "error",
|
|
295
|
+
"no-array-constructor": "off",
|
|
296
|
+
"@typescript-eslint/no-array-constructor": "error",
|
|
297
|
+
"no-bitwise": "warn",
|
|
298
|
+
"no-continue": "error",
|
|
299
|
+
"no-inline-comments": "error",
|
|
300
|
+
"no-lonely-if": "error",
|
|
301
|
+
"no-mixed-operators": "error",
|
|
302
|
+
"no-mixed-spaces-and-tabs": "error",
|
|
303
|
+
"no-multi-assign": "error",
|
|
304
|
+
"no-multiple-empty-lines": ["error", {
|
|
305
|
+
max: 1,
|
|
306
|
+
maxBOF: 0,
|
|
307
|
+
maxEOF: 0
|
|
308
|
+
}],
|
|
309
|
+
"no-negated-condition": "off",
|
|
310
|
+
"no-nested-ternary": "error",
|
|
311
|
+
"no-new-object": "error",
|
|
312
|
+
"no-plusplus": "error",
|
|
313
|
+
"no-restricted-syntax": [
|
|
314
|
+
"error",
|
|
315
|
+
{
|
|
316
|
+
selector: "ForInStatement",
|
|
317
|
+
message: "for-in loops are disallowed. (https://github.com/SPSCommerce/javascript#iterators--no-for-in)"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
selector: "LabeledStatement",
|
|
321
|
+
message: "Labeled statements are disallowed. (https://github.com/SPSCommerce/javascript#control-statements--value-selection)"
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"no-tabs": "error",
|
|
325
|
+
"no-ternary": "off",
|
|
326
|
+
"no-trailing-spaces": "error",
|
|
327
|
+
"no-underscore-dangle": ["error", { enforceInMethodNames: !0 }],
|
|
328
|
+
"no-unneeded-ternary": ["error", { defaultAssignment: !1 }],
|
|
329
|
+
"no-whitespace-before-property": "error",
|
|
330
|
+
"nonblock-statement-body-position": "error",
|
|
331
|
+
"object-curly-newline": "off",
|
|
332
|
+
"@stylistic/object-curly-spacing": ["error", "always"],
|
|
333
|
+
"object-property-newline": ["error", { allowAllPropertiesOnSameLine: !0 }],
|
|
334
|
+
"one-var": ["error", "never"],
|
|
335
|
+
"one-var-declaration-per-line": ["error", "always"],
|
|
336
|
+
"operator-assignment": "error",
|
|
337
|
+
"operator-linebreak": "off",
|
|
338
|
+
"padded-blocks": [
|
|
339
|
+
"error",
|
|
340
|
+
{
|
|
341
|
+
blocks: "never",
|
|
342
|
+
classes: "never",
|
|
343
|
+
switches: "never"
|
|
344
|
+
},
|
|
345
|
+
{ allowSingleLineBlocks: !0 }
|
|
346
|
+
],
|
|
347
|
+
"padding-line-between-statements": "off",
|
|
348
|
+
"@typescript-eslint/padding-line-between-statements": "off",
|
|
349
|
+
"prefer-exponentiation-operator": "off",
|
|
350
|
+
"prefer-object-spread": "error",
|
|
351
|
+
"quote-props": [
|
|
352
|
+
"error",
|
|
353
|
+
"as-needed",
|
|
354
|
+
{
|
|
355
|
+
keywords: !1,
|
|
356
|
+
numbers: !1
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"@stylistic/quotes": [
|
|
360
|
+
"error",
|
|
361
|
+
"double",
|
|
362
|
+
{ avoidEscape: !0 }
|
|
363
|
+
],
|
|
364
|
+
"@stylistic/semi": "error",
|
|
365
|
+
"semi-spacing": "error",
|
|
366
|
+
"semi-style": "error",
|
|
367
|
+
"sort-keys": "off",
|
|
368
|
+
"sort-vars": "off",
|
|
369
|
+
"space-before-blocks": "error",
|
|
370
|
+
"@stylistic/space-before-function-paren": ["error", {
|
|
371
|
+
anonymous: "always",
|
|
372
|
+
named: "never",
|
|
373
|
+
asyncArrow: "always"
|
|
374
|
+
}],
|
|
375
|
+
"space-in-parens": "error",
|
|
376
|
+
"@stylistic/space-infix-ops": "error",
|
|
377
|
+
"space-unary-ops": "error",
|
|
378
|
+
"spaced-comment": "error",
|
|
379
|
+
"switch-colon-spacing": "error",
|
|
380
|
+
"template-tag-spacing": "error",
|
|
381
|
+
"unicode-bom": "error",
|
|
382
|
+
"wrap-regex": "off"
|
|
383
|
+
}, l = {
|
|
384
|
+
"arrow-body-style": "error",
|
|
385
|
+
"arrow-parens": "error",
|
|
386
|
+
"arrow-spacing": "error",
|
|
387
|
+
"constructor-super": "error",
|
|
388
|
+
"generator-star-spacing": ["error", {
|
|
389
|
+
before: !1,
|
|
390
|
+
after: !0
|
|
391
|
+
}],
|
|
392
|
+
"logical-assignment-operators": "error",
|
|
393
|
+
"no-class-assign": "error",
|
|
394
|
+
"no-confusing-arrow": ["error", { allowParens: !0 }],
|
|
395
|
+
"no-const-assign": "error",
|
|
396
|
+
"no-dupe-class-members": "off",
|
|
397
|
+
"@typescript-eslint/no-dupe-class-members": "error",
|
|
398
|
+
"no-duplicate-import": "off",
|
|
399
|
+
"no-duplicate-imports": "off",
|
|
400
|
+
"no-new-symbol": "error",
|
|
401
|
+
"no-restricted-exports": "off",
|
|
402
|
+
"no-restricted-imports": "off",
|
|
403
|
+
"@typescript-eslint/no-restricted-imports": "off",
|
|
404
|
+
"no-this-before-super": "error",
|
|
405
|
+
"no-useless-computed-key": "error",
|
|
406
|
+
"no-useless-constructor": "off",
|
|
407
|
+
"@typescript-eslint/no-useless-constructor": "error",
|
|
408
|
+
"no-useless-rename": "error",
|
|
409
|
+
"no-var": "error",
|
|
410
|
+
"object-shorthand": [
|
|
411
|
+
"error",
|
|
412
|
+
"always",
|
|
413
|
+
{ avoidQuotes: !0 }
|
|
414
|
+
],
|
|
415
|
+
"prefer-arrow-callback": "error",
|
|
416
|
+
"prefer-const": ["error", { ignoreReadBeforeAssign: !0 }],
|
|
417
|
+
"prefer-destructuring": [
|
|
418
|
+
"error",
|
|
419
|
+
{
|
|
420
|
+
VariableDeclarator: {
|
|
421
|
+
array: !1,
|
|
422
|
+
object: !0
|
|
423
|
+
},
|
|
424
|
+
AssignmentExpression: {
|
|
425
|
+
array: !0,
|
|
426
|
+
object: !1
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
{ enforceForRenamedProperties: !1 }
|
|
430
|
+
],
|
|
431
|
+
"prefer-exponentiation-operator": "error",
|
|
432
|
+
"prefer-numeric-literals": "error",
|
|
433
|
+
"prefer-reflect": "off",
|
|
434
|
+
"prefer-rest-params": "error",
|
|
435
|
+
"prefer-spread": "error",
|
|
436
|
+
"prefer-template": "error",
|
|
437
|
+
"require-yield": "error",
|
|
438
|
+
"rest-spread-spacing": "error",
|
|
439
|
+
"sort-imports": "off",
|
|
440
|
+
"symbol-description": "error",
|
|
441
|
+
"template-curly-spacing": "error",
|
|
442
|
+
"yield-star-spacing": "error"
|
|
443
|
+
}, u = {
|
|
444
|
+
"import/no-unresolved": "error",
|
|
445
|
+
"import/named": "error",
|
|
446
|
+
"import/default": "error",
|
|
447
|
+
"import/namespace": "error",
|
|
448
|
+
"import/no-restricted-paths": "error",
|
|
449
|
+
"import/no-absolute-path": "error",
|
|
450
|
+
"import/no-dynamic-require": "error",
|
|
451
|
+
"import/no-internal-modules": "off",
|
|
452
|
+
"import/no-webpack-loader-syntax": "error",
|
|
453
|
+
"import/no-self-import": "error",
|
|
454
|
+
"import/no-cycle": "error",
|
|
455
|
+
"import/no-useless-path-segments": "error",
|
|
456
|
+
"import/no-relative-parent-imports": "off",
|
|
457
|
+
"import/no-relative-packages": "off"
|
|
458
|
+
}, d = {
|
|
459
|
+
"import/export": "warn",
|
|
460
|
+
"import/no-named-as-default": "warn",
|
|
461
|
+
"import/no-named-as-default-member": "warn",
|
|
462
|
+
"import/no-deprecated": "warn",
|
|
463
|
+
"import/no-extraneous-dependencies": "warn",
|
|
464
|
+
"import/no-mutable-exports": "error",
|
|
465
|
+
"import/no-unused-modules": "warn"
|
|
1643
466
|
}, f = {
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
|
|
1667
|
-
*/
|
|
1668
|
-
"import/no-extraneous-dependencies": "warn",
|
|
1669
|
-
/**
|
|
1670
|
-
* Forbid the use of mutable exports with `var` or `let`.
|
|
1671
|
-
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
|
|
1672
|
-
*/
|
|
1673
|
-
"import/no-mutable-exports": "error",
|
|
1674
|
-
/**
|
|
1675
|
-
* Report modules without exports, or exports without matching import in another module
|
|
1676
|
-
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.md
|
|
1677
|
-
*/
|
|
1678
|
-
"import/no-unused-modules": "warn"
|
|
467
|
+
"import/unambiguous": "error",
|
|
468
|
+
"import/no-commonjs": "error",
|
|
469
|
+
"import/no-amd": "error",
|
|
470
|
+
"import/no-nodejs-modules": "error",
|
|
471
|
+
"import/no-import-module-exports": "error"
|
|
472
|
+
}, p = {
|
|
473
|
+
"import/first": "error",
|
|
474
|
+
"import/exports-last": "off",
|
|
475
|
+
"import/no-duplicates": "error",
|
|
476
|
+
"import/no-namespace": "off",
|
|
477
|
+
"import/extensions": ["error", "never"],
|
|
478
|
+
"import/order": "error",
|
|
479
|
+
"import/newline-after-import": "error",
|
|
480
|
+
"import/prefer-default-export": "off",
|
|
481
|
+
"import/max-dependencies": "off",
|
|
482
|
+
"import/no-unassigned-import": "off",
|
|
483
|
+
"import/no-named-default": "error",
|
|
484
|
+
"import/no-default-export": "off",
|
|
485
|
+
"import/no-named-export": "off",
|
|
486
|
+
"import/no-anonymous-default-export": "error",
|
|
487
|
+
"import/group-exports": "off",
|
|
488
|
+
"import/dynamic-import-chunkname": "off"
|
|
1679
489
|
}, m = {
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
},
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
"@typescript-eslint/member-ordering": "error",
|
|
1865
|
-
/**
|
|
1866
|
-
* Enforces using a particular method signature syntax 🔧
|
|
1867
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/method-signature-style.md
|
|
1868
|
-
*/
|
|
1869
|
-
"@typescript-eslint/method-signature-style": "error",
|
|
1870
|
-
/**
|
|
1871
|
-
* Enforces naming conventions for everything across a codebase 💭
|
|
1872
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/naming-convention.md
|
|
1873
|
-
*/
|
|
1874
|
-
"@typescript-eslint/naming-convention": "off",
|
|
1875
|
-
/**
|
|
1876
|
-
* Requires that `.toString()` is only called on objects
|
|
1877
|
-
* which provide useful information when stringified 💭
|
|
1878
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-base-to-string.md
|
|
1879
|
-
*/
|
|
1880
|
-
"@typescript-eslint/no-base-to-string": "error",
|
|
1881
|
-
/**
|
|
1882
|
-
* Disallow non-null assertion in locations that may be confusing 🔧
|
|
1883
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md
|
|
1884
|
-
*/
|
|
1885
|
-
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
1886
|
-
/**
|
|
1887
|
-
* Requires expressions of type void to appear in statement position 🔧 💭
|
|
1888
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md
|
|
1889
|
-
*/
|
|
1890
|
-
"@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: !0 }],
|
|
1891
|
-
/**
|
|
1892
|
-
* Disallow the delete operator with computed key expressions 🔧
|
|
1893
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.md
|
|
1894
|
-
*/
|
|
1895
|
-
"@typescript-eslint/no-dynamic-delete": "error",
|
|
1896
|
-
/**
|
|
1897
|
-
* Disallow the declaration of empty interfaces ✅ 🔧
|
|
1898
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-interface.md
|
|
1899
|
-
*/
|
|
1900
|
-
"@typescript-eslint/no-empty-interface": "error",
|
|
1901
|
-
/**
|
|
1902
|
-
* Disallow usage of the `object` type with an object literal
|
|
1903
|
-
* as a type annotation ✅
|
|
1904
|
-
*/
|
|
1905
|
-
"@typescript-eslint/no-empty-object-type": "error",
|
|
1906
|
-
/**
|
|
1907
|
-
* Disallow usage of the `any` type ✅ 🔧
|
|
1908
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-explicit-any.md
|
|
1909
|
-
*/
|
|
1910
|
-
"@typescript-eslint/no-explicit-any": "error",
|
|
1911
|
-
/**
|
|
1912
|
-
* Disallow extra non-null assertion ✅ 🔧
|
|
1913
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md
|
|
1914
|
-
*/
|
|
1915
|
-
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
|
1916
|
-
/**
|
|
1917
|
-
* Forbids the use of classes as namespaces
|
|
1918
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-extraneous-class.md
|
|
1919
|
-
*/
|
|
1920
|
-
"@typescript-eslint/no-extraneous-class": "error",
|
|
1921
|
-
/**
|
|
1922
|
-
* Requires Promise-like values to be handled appropriately ✅ 💭
|
|
1923
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-floating-promises.md
|
|
1924
|
-
*/
|
|
1925
|
-
"@typescript-eslint/no-floating-promises": "error",
|
|
1926
|
-
/**
|
|
1927
|
-
* Disallow iterating over an array with a for-in loop ✅ 💭
|
|
1928
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-for-in-array.md
|
|
1929
|
-
*/
|
|
1930
|
-
"@typescript-eslint/no-for-in-array": "error",
|
|
1931
|
-
/**
|
|
1932
|
-
* Disallows explicit type declarations for variables or
|
|
1933
|
-
* parameters initialized to a number, string, or boolean ✅ 🔧
|
|
1934
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inferrable-types.md
|
|
1935
|
-
*/
|
|
1936
|
-
"@typescript-eslint/no-inferrable-types": "error",
|
|
1937
|
-
/**
|
|
1938
|
-
* Disallows usage of `void` type outside of generic or return types
|
|
1939
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.md
|
|
1940
|
-
*/
|
|
1941
|
-
"@typescript-eslint/no-invalid-void-type": "warn",
|
|
1942
|
-
/**
|
|
1943
|
-
* Disallow the `void` operator except when used to discard a value 🔧 💭
|
|
1944
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md
|
|
1945
|
-
*/
|
|
1946
|
-
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
1947
|
-
/**
|
|
1948
|
-
* Enforce valid definition of `new` and `constructor` ✅
|
|
1949
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-misused-new.md
|
|
1950
|
-
*/
|
|
1951
|
-
"@typescript-eslint/no-misused-new": "error",
|
|
1952
|
-
/**
|
|
1953
|
-
* Avoid using promises in places not designed to handle them ✅ 💭
|
|
1954
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-misused-promises.md
|
|
1955
|
-
*/
|
|
1956
|
-
"@typescript-eslint/no-misused-promises": "error",
|
|
1957
|
-
/**
|
|
1958
|
-
* Disallow the use of custom TypeScript modules and namespaces ✅
|
|
1959
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-namespace.md
|
|
1960
|
-
*/
|
|
1961
|
-
"@typescript-eslint/no-namespace": "error",
|
|
1962
|
-
/**
|
|
1963
|
-
* Disallows using a non-null assertion in the left operand of the nullish coalescing operator
|
|
1964
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md
|
|
1965
|
-
*/
|
|
1966
|
-
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
1967
|
-
/**
|
|
1968
|
-
* Disallows using a non-null assertion after an optional chain expression ✅
|
|
1969
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md
|
|
1970
|
-
*/
|
|
1971
|
-
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
1972
|
-
/**
|
|
1973
|
-
* Disallows non-null assertions using the `!` postfix operator ✅
|
|
1974
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md
|
|
1975
|
-
*/
|
|
1976
|
-
"@typescript-eslint/no-non-null-assertion": "error",
|
|
1977
|
-
/**
|
|
1978
|
-
* Disallows invocation of `require()`
|
|
1979
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-require-imports.md
|
|
1980
|
-
*/
|
|
1981
|
-
"@typescript-eslint/no-require-imports": "error",
|
|
1982
|
-
/**
|
|
1983
|
-
* Disallow aliasing `this` ✅
|
|
1984
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-this-alias.md
|
|
1985
|
-
*/
|
|
1986
|
-
"@typescript-eslint/no-this-alias": "error",
|
|
1987
|
-
/**
|
|
1988
|
-
* Disallow the use of type aliases
|
|
1989
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-type-alias.md
|
|
1990
|
-
*/
|
|
1991
|
-
"@typescript-eslint/no-type-alias": "off",
|
|
1992
|
-
/**
|
|
1993
|
-
* Flags unnecessary equality comparisons against boolean literals 🔧 💭
|
|
1994
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md
|
|
1995
|
-
*/
|
|
1996
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
|
1997
|
-
/**
|
|
1998
|
-
* Prevents conditionals where the type is always truthy or always falsy 🔧 💭
|
|
1999
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md
|
|
2000
|
-
*/
|
|
2001
|
-
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
2002
|
-
/**
|
|
2003
|
-
* Warns when a namespace qualifier is unnecessary 🔧 💭
|
|
2004
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md
|
|
2005
|
-
*/
|
|
2006
|
-
"@typescript-eslint/no-unnecessary-qualifier": "warn",
|
|
2007
|
-
/**
|
|
2008
|
-
* Enforces that type arguments will not be used if not required 🔧 💭
|
|
2009
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md
|
|
2010
|
-
*/
|
|
2011
|
-
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
|
2012
|
-
/**
|
|
2013
|
-
* Warns if a type assertion does not change the type of an expression ✅ 🔧 💭
|
|
2014
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md
|
|
2015
|
-
*/
|
|
2016
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
2017
|
-
/**
|
|
2018
|
-
* Disallows unnecessary constraints on generic types 🔧
|
|
2019
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md
|
|
2020
|
-
*/
|
|
2021
|
-
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
|
2022
|
-
/**
|
|
2023
|
-
* Disallows calling an function with an `any` type value 💭
|
|
2024
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.md
|
|
2025
|
-
*/
|
|
2026
|
-
"@typescript-eslint/no-unsafe-argument": "error",
|
|
2027
|
-
/**
|
|
2028
|
-
* Disallows assigning `any` to variables and properties ✅ 💭
|
|
2029
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md
|
|
2030
|
-
*/
|
|
2031
|
-
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
2032
|
-
/**
|
|
2033
|
-
* Disallows calling an `any` type value ✅ 💭
|
|
2034
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-call.md
|
|
2035
|
-
*/
|
|
2036
|
-
"@typescript-eslint/no-unsafe-call": "error",
|
|
2037
|
-
/**
|
|
2038
|
-
* Disallows member access on `any` typed variables ✅ 💭
|
|
2039
|
-
*/
|
|
2040
|
-
"@typescript-eslint/no-unsafe-function-type": "error",
|
|
2041
|
-
/**
|
|
2042
|
-
* Disallows member access on `any` typed variables ✅ 💭
|
|
2043
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md
|
|
2044
|
-
*/
|
|
2045
|
-
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
2046
|
-
/**
|
|
2047
|
-
* Disallows returning any from a function ✅ 💭
|
|
2048
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-return.md
|
|
2049
|
-
*/
|
|
2050
|
-
"@typescript-eslint/no-unsafe-return": "error",
|
|
2051
|
-
/**
|
|
2052
|
-
* Disallows the use of require statements except in import statements ✅
|
|
2053
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-var-requires.md
|
|
2054
|
-
*/
|
|
2055
|
-
"@typescript-eslint/no-var-requires": "error",
|
|
2056
|
-
/**
|
|
2057
|
-
* Disallow using confusing built-in primitive class wrappers.
|
|
2058
|
-
*/
|
|
2059
|
-
"@typescript-eslint/no-wrapper-object-types": "error",
|
|
2060
|
-
/**
|
|
2061
|
-
* Prefers a non-null assertion over explicit type cast when possible 🔧 💭
|
|
2062
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md
|
|
2063
|
-
* Disabled because it enforces use of postfix ! operator, which is banned by
|
|
2064
|
-
* @typescript-eslint/no-non-null-assertion (a recommended rule)
|
|
2065
|
-
*/
|
|
2066
|
-
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
2067
|
-
/**
|
|
2068
|
-
* Prefer usage of as const over literal type ✅ 🔧
|
|
2069
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-as-const.md
|
|
2070
|
-
*/
|
|
2071
|
-
"@typescript-eslint/prefer-as-const": "error",
|
|
2072
|
-
/**
|
|
2073
|
-
* Prefer initializing each enums member value
|
|
2074
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md
|
|
2075
|
-
*/
|
|
2076
|
-
"@typescript-eslint/prefer-enum-initializers": "error",
|
|
2077
|
-
/**
|
|
2078
|
-
* Prefer a ‘for-of’ loop over a standard ‘for’ loop if the
|
|
2079
|
-
* index is only used to access the array being iterated
|
|
2080
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-for-of.md
|
|
2081
|
-
*/
|
|
2082
|
-
"@typescript-eslint/prefer-for-of": "error",
|
|
2083
|
-
/**
|
|
2084
|
-
* Use function types instead of interfaces with call signatures 🔧
|
|
2085
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-function-type.md
|
|
2086
|
-
*/
|
|
2087
|
-
"@typescript-eslint/prefer-function-type": "error",
|
|
2088
|
-
/**
|
|
2089
|
-
* Enforce includes method over indexOf method 🔧 💭
|
|
2090
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-includes.md
|
|
2091
|
-
*/
|
|
2092
|
-
"@typescript-eslint/prefer-includes": "error",
|
|
2093
|
-
/**
|
|
2094
|
-
* Require that all enum members be literal values to
|
|
2095
|
-
* prevent unintended enum member name shadow issues
|
|
2096
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md
|
|
2097
|
-
*/
|
|
2098
|
-
"@typescript-eslint/prefer-literal-enum-member": "error",
|
|
2099
|
-
/**
|
|
2100
|
-
* Require the use of the `namespace` keyword instead of the
|
|
2101
|
-
* `module` keyword to declare custom TypeScript modules ✅ 🔧
|
|
2102
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md
|
|
2103
|
-
*/
|
|
2104
|
-
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
2105
|
-
/**
|
|
2106
|
-
* Enforce the usage of the nullish coalescing operator instead of logical chaining 💭
|
|
2107
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md
|
|
2108
|
-
*/
|
|
2109
|
-
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
|
2110
|
-
/**
|
|
2111
|
-
* Prefer using concise optional chain expressions instead of chained logical ands
|
|
2112
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.md
|
|
2113
|
-
*/
|
|
2114
|
-
"@typescript-eslint/prefer-optional-chain": "error",
|
|
2115
|
-
/**
|
|
2116
|
-
* Requires that private members are marked as `readonly` if
|
|
2117
|
-
* they're never modified outside of the constructor 🔧 💭
|
|
2118
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-readonly.md
|
|
2119
|
-
*/
|
|
2120
|
-
"@typescript-eslint/prefer-readonly": "error",
|
|
2121
|
-
/**
|
|
2122
|
-
* Requires that function parameters are typed as `readonly`
|
|
2123
|
-
* to prevent accidental mutation of inputs 💭
|
|
2124
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md
|
|
2125
|
-
*/
|
|
2126
|
-
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
2127
|
-
/**
|
|
2128
|
-
* Prefer using type parameter when calling `Array#reduce` instead of casting 🔧 💭
|
|
2129
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md
|
|
2130
|
-
*/
|
|
2131
|
-
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
2132
|
-
/**
|
|
2133
|
-
* Enforce that `RegExp#exec` is used instead of `String#match`
|
|
2134
|
-
* if no global flag is provided ✅ 🔧 💭
|
|
2135
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md
|
|
2136
|
-
*/
|
|
2137
|
-
"@typescript-eslint/prefer-regexp-exec": "error",
|
|
2138
|
-
/**
|
|
2139
|
-
* Enforce that `this` is used when only `this` type is returned 🔧 💭
|
|
2140
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-return-this-type.md
|
|
2141
|
-
*/
|
|
2142
|
-
"@typescript-eslint/prefer-return-this-type": "error",
|
|
2143
|
-
/**
|
|
2144
|
-
* Enforce the use of `String#startsWith` and `String#endsWith` instead
|
|
2145
|
-
* of other equivalent methods of checking substrings 🔧 💭
|
|
2146
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md
|
|
2147
|
-
*/
|
|
2148
|
-
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
2149
|
-
/**
|
|
2150
|
-
* Recommends using `@ts-expect-error` over `@ts-ignore` 🔧
|
|
2151
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md
|
|
2152
|
-
*/
|
|
2153
|
-
"@typescript-eslint/prefer-ts-expect-error": "error",
|
|
2154
|
-
/**
|
|
2155
|
-
* Requires any function or method that returns a Promise to be marked async 🔧 💭
|
|
2156
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/promise-function-async.md
|
|
2157
|
-
*/
|
|
2158
|
-
"@typescript-eslint/promise-function-async": "off",
|
|
2159
|
-
/**
|
|
2160
|
-
* Requires `Array#sort` calls to always provide a `compareFunction` 💭
|
|
2161
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/require-array-sort-compare.md
|
|
2162
|
-
*/
|
|
2163
|
-
"@typescript-eslint/require-array-sort-compare": "error",
|
|
2164
|
-
/**
|
|
2165
|
-
* When adding two variables, operands must both be of type number or of type string ✅ 💭
|
|
2166
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-plus-operands.md
|
|
2167
|
-
*/
|
|
2168
|
-
"@typescript-eslint/restrict-plus-operands": "error",
|
|
2169
|
-
/**
|
|
2170
|
-
* Enforce template literal expressions to be of string type ✅ 💭
|
|
2171
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-template-expressions.md
|
|
2172
|
-
*/
|
|
2173
|
-
"@typescript-eslint/restrict-template-expressions": "error",
|
|
2174
|
-
/**
|
|
2175
|
-
* Restricts the types allowed in boolean expressions 🔧 💭
|
|
2176
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md
|
|
2177
|
-
*/
|
|
2178
|
-
"@typescript-eslint/strict-boolean-expressions": "error",
|
|
2179
|
-
/**
|
|
2180
|
-
* Exhaustiveness checking in switch with union type 💭
|
|
2181
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md
|
|
2182
|
-
*/
|
|
2183
|
-
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
2184
|
-
/**
|
|
2185
|
-
* Sets preference level for triple slash directives versus ES6-style import declarations ✅
|
|
2186
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/triple-slash-reference.md
|
|
2187
|
-
*/
|
|
2188
|
-
"@typescript-eslint/triple-slash-reference": "error",
|
|
2189
|
-
/**
|
|
2190
|
-
* Require consistent spacing around type annotations 🔧
|
|
2191
|
-
* https://eslint.style/rules/default/type-annotation-spacing#ts-type-annotation-spacing
|
|
2192
|
-
*/
|
|
2193
|
-
"@stylistic/type-annotation-spacing": "error",
|
|
2194
|
-
/**
|
|
2195
|
-
* Requires type annotations to exist
|
|
2196
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/typedef.md
|
|
2197
|
-
*/
|
|
2198
|
-
"@typescript-eslint/typedef": "off",
|
|
2199
|
-
/**
|
|
2200
|
-
* Enforces unbound methods are called with their expected scope ✅ 💭
|
|
2201
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/unbound-method.md
|
|
2202
|
-
*/
|
|
2203
|
-
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: !0 }],
|
|
2204
|
-
/**
|
|
2205
|
-
* Warns for any two overloads that could be unified into
|
|
2206
|
-
* one by using a union or an optional/rest parameter
|
|
2207
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/unified-signatures.md
|
|
2208
|
-
*/
|
|
2209
|
-
"@typescript-eslint/unified-signatures": "warn"
|
|
2210
|
-
}, w = [
|
|
2211
|
-
// Production TypeScript files
|
|
2212
|
-
{
|
|
2213
|
-
files: ["**/*.ts", "**/*.tsx"],
|
|
2214
|
-
ignores: ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"],
|
|
2215
|
-
languageOptions: {
|
|
2216
|
-
parser: e,
|
|
2217
|
-
parserOptions: {
|
|
2218
|
-
// Note: For type-aware linting rules to work, you must configure
|
|
2219
|
-
// the 'project' option in your own config to point to your tsconfig.
|
|
2220
|
-
// Example: project: "./tsconfig.json" or project: true (auto-detect)
|
|
2221
|
-
},
|
|
2222
|
-
globals: {
|
|
2223
|
-
// Browser globals
|
|
2224
|
-
window: "readonly",
|
|
2225
|
-
document: "readonly",
|
|
2226
|
-
navigator: "readonly",
|
|
2227
|
-
console: "readonly",
|
|
2228
|
-
setTimeout: "readonly",
|
|
2229
|
-
clearTimeout: "readonly",
|
|
2230
|
-
setInterval: "readonly",
|
|
2231
|
-
clearInterval: "readonly"
|
|
2232
|
-
}
|
|
2233
|
-
},
|
|
2234
|
-
settings: {
|
|
2235
|
-
"import/extensions": [".ts", ".tsx"],
|
|
2236
|
-
"import/parsers": {
|
|
2237
|
-
"@typescript-eslint/parser": [".ts", ".tsx"]
|
|
2238
|
-
},
|
|
2239
|
-
"import/resolver": {
|
|
2240
|
-
typescript: {}
|
|
2241
|
-
}
|
|
2242
|
-
},
|
|
2243
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
2244
|
-
/* eslint-disable import/no-named-as-default-member */
|
|
2245
|
-
/* eslint-disable max-len */
|
|
2246
|
-
plugins: {
|
|
2247
|
-
"@typescript-eslint": r,
|
|
2248
|
-
import: o,
|
|
2249
|
-
"@stylistic": t
|
|
2250
|
-
},
|
|
2251
|
-
/* eslint-enable max-len */
|
|
2252
|
-
/* eslint-enable import/no-named-as-default-member */
|
|
2253
|
-
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
|
|
2254
|
-
rules: {
|
|
2255
|
-
...s,
|
|
2256
|
-
...n,
|
|
2257
|
-
...i,
|
|
2258
|
-
...a,
|
|
2259
|
-
...p,
|
|
2260
|
-
...l,
|
|
2261
|
-
...c,
|
|
2262
|
-
...f,
|
|
2263
|
-
...m,
|
|
2264
|
-
...y,
|
|
2265
|
-
...u
|
|
2266
|
-
}
|
|
2267
|
-
},
|
|
2268
|
-
// Test files - includes test framework globals
|
|
2269
|
-
{
|
|
2270
|
-
files: ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"],
|
|
2271
|
-
languageOptions: {
|
|
2272
|
-
parser: e,
|
|
2273
|
-
parserOptions: {
|
|
2274
|
-
// Note: For type-aware linting rules to work, you must configure
|
|
2275
|
-
// the 'project' option in your own config to point to your tsconfig.
|
|
2276
|
-
// Example: project: "./tsconfig.json" or project: true (auto-detect)
|
|
2277
|
-
},
|
|
2278
|
-
globals: {
|
|
2279
|
-
// Browser globals
|
|
2280
|
-
window: "readonly",
|
|
2281
|
-
document: "readonly",
|
|
2282
|
-
navigator: "readonly",
|
|
2283
|
-
console: "readonly",
|
|
2284
|
-
setTimeout: "readonly",
|
|
2285
|
-
clearTimeout: "readonly",
|
|
2286
|
-
setInterval: "readonly",
|
|
2287
|
-
clearInterval: "readonly",
|
|
2288
|
-
// Jest/Vitest test globals
|
|
2289
|
-
describe: "readonly",
|
|
2290
|
-
test: "readonly",
|
|
2291
|
-
it: "readonly",
|
|
2292
|
-
expect: "readonly",
|
|
2293
|
-
beforeEach: "readonly",
|
|
2294
|
-
afterEach: "readonly",
|
|
2295
|
-
beforeAll: "readonly",
|
|
2296
|
-
afterAll: "readonly",
|
|
2297
|
-
vi: "readonly",
|
|
2298
|
-
jest: "readonly"
|
|
2299
|
-
}
|
|
2300
|
-
},
|
|
2301
|
-
settings: {
|
|
2302
|
-
"import/extensions": [".ts", ".tsx"],
|
|
2303
|
-
"import/parsers": {
|
|
2304
|
-
"@typescript-eslint/parser": [".ts", ".tsx"]
|
|
2305
|
-
},
|
|
2306
|
-
"import/resolver": {
|
|
2307
|
-
typescript: {
|
|
2308
|
-
alwaysTryTypes: !0
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
},
|
|
2312
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
2313
|
-
plugins: {
|
|
2314
|
-
import: o,
|
|
2315
|
-
"@stylistic": t,
|
|
2316
|
-
"@typescript-eslint": r
|
|
2317
|
-
},
|
|
2318
|
-
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
|
|
2319
|
-
rules: {
|
|
2320
|
-
...s,
|
|
2321
|
-
...n,
|
|
2322
|
-
...i,
|
|
2323
|
-
...a,
|
|
2324
|
-
...p,
|
|
2325
|
-
...l,
|
|
2326
|
-
...c,
|
|
2327
|
-
...f,
|
|
2328
|
-
...m,
|
|
2329
|
-
...y,
|
|
2330
|
-
...u
|
|
2331
|
-
}
|
|
2332
|
-
}
|
|
2333
|
-
];
|
|
2334
|
-
export {
|
|
2335
|
-
w as default
|
|
2336
|
-
};
|
|
490
|
+
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
491
|
+
"@typescript-eslint/array-type": ["error", { default: "array-simple" }],
|
|
492
|
+
"@typescript-eslint/await-thenable": "error",
|
|
493
|
+
"@typescript-eslint/ban-ts-comment": "error",
|
|
494
|
+
"@typescript-eslint/ban-tslint-comment": "off",
|
|
495
|
+
"@typescript-eslint/class-literal-property-style": ["error", "fields"],
|
|
496
|
+
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
|
|
497
|
+
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
|
|
498
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
499
|
+
"@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports" }],
|
|
500
|
+
"@typescript-eslint/explicit-function-return-type": "error",
|
|
501
|
+
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
502
|
+
"@typescript-eslint/explicit-module-boundary-types": "error",
|
|
503
|
+
"@stylistic/member-delimiter-style": "error",
|
|
504
|
+
"@typescript-eslint/member-ordering": "error",
|
|
505
|
+
"@typescript-eslint/method-signature-style": "error",
|
|
506
|
+
"@typescript-eslint/naming-convention": "off",
|
|
507
|
+
"@typescript-eslint/no-base-to-string": "error",
|
|
508
|
+
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
509
|
+
"@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: !0 }],
|
|
510
|
+
"@typescript-eslint/no-dynamic-delete": "error",
|
|
511
|
+
"@typescript-eslint/no-empty-interface": "error",
|
|
512
|
+
"@typescript-eslint/no-empty-object-type": "error",
|
|
513
|
+
"@typescript-eslint/no-explicit-any": "error",
|
|
514
|
+
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
|
515
|
+
"@typescript-eslint/no-extraneous-class": "error",
|
|
516
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
517
|
+
"@typescript-eslint/no-for-in-array": "error",
|
|
518
|
+
"@typescript-eslint/no-inferrable-types": "error",
|
|
519
|
+
"@typescript-eslint/no-invalid-void-type": "warn",
|
|
520
|
+
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
521
|
+
"@typescript-eslint/no-misused-new": "error",
|
|
522
|
+
"@typescript-eslint/no-misused-promises": "error",
|
|
523
|
+
"@typescript-eslint/no-namespace": "error",
|
|
524
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
525
|
+
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
526
|
+
"@typescript-eslint/no-non-null-assertion": "error",
|
|
527
|
+
"@typescript-eslint/no-require-imports": "error",
|
|
528
|
+
"@typescript-eslint/no-this-alias": "error",
|
|
529
|
+
"@typescript-eslint/no-type-alias": "off",
|
|
530
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
|
531
|
+
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
532
|
+
"@typescript-eslint/no-unnecessary-qualifier": "warn",
|
|
533
|
+
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
|
534
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
535
|
+
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
|
536
|
+
"@typescript-eslint/no-unsafe-argument": "error",
|
|
537
|
+
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
538
|
+
"@typescript-eslint/no-unsafe-call": "error",
|
|
539
|
+
"@typescript-eslint/no-unsafe-function-type": "error",
|
|
540
|
+
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
541
|
+
"@typescript-eslint/no-unsafe-return": "error",
|
|
542
|
+
"@typescript-eslint/no-var-requires": "error",
|
|
543
|
+
"@typescript-eslint/no-wrapper-object-types": "error",
|
|
544
|
+
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
545
|
+
"@typescript-eslint/prefer-as-const": "error",
|
|
546
|
+
"@typescript-eslint/prefer-enum-initializers": "error",
|
|
547
|
+
"@typescript-eslint/prefer-for-of": "error",
|
|
548
|
+
"@typescript-eslint/prefer-function-type": "error",
|
|
549
|
+
"@typescript-eslint/prefer-includes": "error",
|
|
550
|
+
"@typescript-eslint/prefer-literal-enum-member": "error",
|
|
551
|
+
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
552
|
+
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
|
553
|
+
"@typescript-eslint/prefer-optional-chain": "error",
|
|
554
|
+
"@typescript-eslint/prefer-readonly": "error",
|
|
555
|
+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
556
|
+
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
557
|
+
"@typescript-eslint/prefer-regexp-exec": "error",
|
|
558
|
+
"@typescript-eslint/prefer-return-this-type": "error",
|
|
559
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
560
|
+
"@typescript-eslint/prefer-ts-expect-error": "error",
|
|
561
|
+
"@typescript-eslint/promise-function-async": "off",
|
|
562
|
+
"@typescript-eslint/require-array-sort-compare": "error",
|
|
563
|
+
"@typescript-eslint/restrict-plus-operands": "error",
|
|
564
|
+
"@typescript-eslint/restrict-template-expressions": "error",
|
|
565
|
+
"@typescript-eslint/strict-boolean-expressions": "error",
|
|
566
|
+
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
567
|
+
"@typescript-eslint/triple-slash-reference": "error",
|
|
568
|
+
"@stylistic/type-annotation-spacing": "error",
|
|
569
|
+
"@typescript-eslint/typedef": "off",
|
|
570
|
+
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: !0 }],
|
|
571
|
+
"@typescript-eslint/unified-signatures": "warn"
|
|
572
|
+
}, h = [{
|
|
573
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
574
|
+
ignores: [
|
|
575
|
+
"**/*.spec.ts",
|
|
576
|
+
"**/*.spec.tsx",
|
|
577
|
+
"**/*.test.ts",
|
|
578
|
+
"**/*.test.tsx"
|
|
579
|
+
],
|
|
580
|
+
languageOptions: {
|
|
581
|
+
parser: e,
|
|
582
|
+
parserOptions: {},
|
|
583
|
+
globals: {
|
|
584
|
+
window: "readonly",
|
|
585
|
+
document: "readonly",
|
|
586
|
+
navigator: "readonly",
|
|
587
|
+
console: "readonly",
|
|
588
|
+
setTimeout: "readonly",
|
|
589
|
+
clearTimeout: "readonly",
|
|
590
|
+
setInterval: "readonly",
|
|
591
|
+
clearInterval: "readonly"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
settings: {
|
|
595
|
+
"import/extensions": [".ts", ".tsx"],
|
|
596
|
+
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] },
|
|
597
|
+
"import/resolver": { typescript: {} }
|
|
598
|
+
},
|
|
599
|
+
plugins: {
|
|
600
|
+
"@typescript-eslint": t,
|
|
601
|
+
import: n,
|
|
602
|
+
"@stylistic": r
|
|
603
|
+
},
|
|
604
|
+
rules: {
|
|
605
|
+
...i,
|
|
606
|
+
...a,
|
|
607
|
+
...o,
|
|
608
|
+
...s,
|
|
609
|
+
...c,
|
|
610
|
+
...l,
|
|
611
|
+
...u,
|
|
612
|
+
...d,
|
|
613
|
+
...f,
|
|
614
|
+
...p,
|
|
615
|
+
...m
|
|
616
|
+
}
|
|
617
|
+
}, {
|
|
618
|
+
files: [
|
|
619
|
+
"**/*.spec.ts",
|
|
620
|
+
"**/*.spec.tsx",
|
|
621
|
+
"**/*.test.ts",
|
|
622
|
+
"**/*.test.tsx"
|
|
623
|
+
],
|
|
624
|
+
languageOptions: {
|
|
625
|
+
parser: e,
|
|
626
|
+
parserOptions: {},
|
|
627
|
+
globals: {
|
|
628
|
+
window: "readonly",
|
|
629
|
+
document: "readonly",
|
|
630
|
+
navigator: "readonly",
|
|
631
|
+
console: "readonly",
|
|
632
|
+
setTimeout: "readonly",
|
|
633
|
+
clearTimeout: "readonly",
|
|
634
|
+
setInterval: "readonly",
|
|
635
|
+
clearInterval: "readonly",
|
|
636
|
+
describe: "readonly",
|
|
637
|
+
test: "readonly",
|
|
638
|
+
it: "readonly",
|
|
639
|
+
expect: "readonly",
|
|
640
|
+
beforeEach: "readonly",
|
|
641
|
+
afterEach: "readonly",
|
|
642
|
+
beforeAll: "readonly",
|
|
643
|
+
afterAll: "readonly",
|
|
644
|
+
vi: "readonly",
|
|
645
|
+
jest: "readonly"
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
settings: {
|
|
649
|
+
"import/extensions": [".ts", ".tsx"],
|
|
650
|
+
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] },
|
|
651
|
+
"import/resolver": { typescript: { alwaysTryTypes: !0 } }
|
|
652
|
+
},
|
|
653
|
+
plugins: {
|
|
654
|
+
import: n,
|
|
655
|
+
"@stylistic": r,
|
|
656
|
+
"@typescript-eslint": t
|
|
657
|
+
},
|
|
658
|
+
rules: {
|
|
659
|
+
...i,
|
|
660
|
+
...a,
|
|
661
|
+
...o,
|
|
662
|
+
...s,
|
|
663
|
+
...c,
|
|
664
|
+
...l,
|
|
665
|
+
...u,
|
|
666
|
+
...d,
|
|
667
|
+
...f,
|
|
668
|
+
...p,
|
|
669
|
+
...m
|
|
670
|
+
}
|
|
671
|
+
}];
|
|
672
|
+
//#endregion
|
|
673
|
+
export { h as default };
|