@newsteam/eslint-config 1.2.13 → 1.2.14
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/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -24
- package/dist/plugins/array-function.js +5 -5
- package/dist/plugins/css-modules.js +2 -2
- package/dist/plugins/destructuring.js +2 -2
- package/dist/plugins/eslint-comments.js +19 -19
- package/dist/plugins/import-newlines.js +1 -1
- package/dist/plugins/import-x.js +19 -19
- package/dist/plugins/newline-destructuring.js +1 -1
- package/dist/plugins/next.js +21 -21
- package/dist/plugins/no-unsanitized.js +2 -2
- package/dist/plugins/no-useless-assign.js +1 -1
- package/dist/plugins/node.js +31 -31
- package/dist/plugins/perfectionist.d.ts.map +1 -1
- package/dist/plugins/perfectionist.js +21 -20
- package/dist/plugins/promise.js +13 -13
- package/dist/plugins/react-19-upgrade.js +7 -7
- package/dist/plugins/react-compiler.js +1 -1
- package/dist/plugins/react-hooks.js +22 -22
- package/dist/plugins/react-perf.js +1 -1
- package/dist/plugins/react-refresh.js +1 -1
- package/dist/plugins/react.js +69 -69
- package/dist/plugins/security.js +13 -13
- package/dist/plugins/sort-react-dependency-arrays.js +1 -1
- package/dist/plugins/stylistic.d.ts.map +1 -1
- package/dist/plugins/stylistic.js +102 -88
- package/dist/plugins/typescript.d.ts.map +1 -1
- package/dist/plugins/typescript.js +164 -126
- package/dist/plugins/unicorn.js +127 -127
- package/dist/rules.js +186 -186
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +0 -1
- package/package.json +38 -44
- package/dist/plugins/const-case.d.ts +0 -3
- package/dist/plugins/const-case.d.ts.map +0 -1
- package/dist/plugins/const-case.js +0 -16
- package/dist/plugins/more.d.ts +0 -3
- package/dist/plugins/more.d.ts.map +0 -1
- package/dist/plugins/more.js +0 -101
package/dist/rules.js
CHANGED
|
@@ -24,14 +24,14 @@ export const rules = [
|
|
|
24
24
|
*
|
|
25
25
|
* https://eslint.org/docs/latest/rules/accessor-pairs
|
|
26
26
|
*/
|
|
27
|
-
"accessor-pairs": "
|
|
27
|
+
"accessor-pairs": "warn",
|
|
28
28
|
/*
|
|
29
29
|
* Enforce return statements in callbacks of array methods
|
|
30
30
|
*
|
|
31
31
|
* https://eslint.org/docs/latest/rules/array-callback-return
|
|
32
32
|
*/
|
|
33
33
|
"array-callback-return": [
|
|
34
|
-
"
|
|
34
|
+
"warn",
|
|
35
35
|
{
|
|
36
36
|
allowImplicit: true,
|
|
37
37
|
},
|
|
@@ -41,19 +41,19 @@ export const rules = [
|
|
|
41
41
|
*
|
|
42
42
|
* https://eslint.org/docs/latest/rules/arrow-body-style
|
|
43
43
|
*/
|
|
44
|
-
"arrow-body-style": "
|
|
44
|
+
"arrow-body-style": "warn",
|
|
45
45
|
/*
|
|
46
46
|
* Enforce the use of variables within the scope they are defined
|
|
47
47
|
*
|
|
48
48
|
* https://eslint.org/docs/latest/rules/block-scoped-var
|
|
49
49
|
*/
|
|
50
|
-
"block-scoped-var": "
|
|
50
|
+
"block-scoped-var": "warn",
|
|
51
51
|
/*
|
|
52
52
|
* Enforce camelcase naming convention
|
|
53
53
|
*
|
|
54
54
|
* https://eslint.org/docs/latest/rules/camelcase
|
|
55
55
|
*/
|
|
56
|
-
camelcase: "
|
|
56
|
+
camelcase: "warn",
|
|
57
57
|
/*
|
|
58
58
|
* Enforce or disallow capitalization of the first letter of a comment
|
|
59
59
|
*
|
|
@@ -77,7 +77,7 @@ export const rules = [
|
|
|
77
77
|
* https://eslint.org/docs/latest/rules/complexity
|
|
78
78
|
*/
|
|
79
79
|
complexity: [
|
|
80
|
-
"
|
|
80
|
+
"warn",
|
|
81
81
|
{
|
|
82
82
|
max: MAXIMUM_CYCLOMATIC_COMPLEXITY,
|
|
83
83
|
},
|
|
@@ -87,105 +87,105 @@ export const rules = [
|
|
|
87
87
|
*
|
|
88
88
|
* https://eslint.org/docs/latest/rules/consistent-return
|
|
89
89
|
*/
|
|
90
|
-
"consistent-return": "
|
|
90
|
+
"consistent-return": "warn",
|
|
91
91
|
/*
|
|
92
92
|
* Enforce consistent naming when capturing the current execution context
|
|
93
93
|
*
|
|
94
94
|
* https://eslint.org/docs/latest/rules/consistent-this
|
|
95
95
|
*/
|
|
96
|
-
"consistent-this": ["
|
|
96
|
+
"consistent-this": ["warn", "self"],
|
|
97
97
|
/*
|
|
98
98
|
* Require super() calls in constructors
|
|
99
99
|
*
|
|
100
100
|
* https://eslint.org/docs/latest/rules/constructor-super
|
|
101
101
|
*/
|
|
102
|
-
"constructor-super": "
|
|
102
|
+
"constructor-super": "warn",
|
|
103
103
|
/*
|
|
104
104
|
* Enforce consistent brace style for all control statements
|
|
105
105
|
*
|
|
106
106
|
* https://eslint.org/docs/latest/rules/curly
|
|
107
107
|
*/
|
|
108
|
-
curly: "
|
|
108
|
+
curly: "warn",
|
|
109
109
|
/*
|
|
110
110
|
* Require default cases in switch statements
|
|
111
111
|
*
|
|
112
112
|
* https://eslint.org/docs/latest/rules/default-case
|
|
113
113
|
*/
|
|
114
|
-
"default-case": "
|
|
114
|
+
"default-case": "warn",
|
|
115
115
|
/*
|
|
116
116
|
* Enforce default clauses in switch statements to be last
|
|
117
117
|
*
|
|
118
118
|
* https://eslint.org/docs/latest/rules/default-case-last
|
|
119
119
|
*/
|
|
120
|
-
"default-case-last": "
|
|
120
|
+
"default-case-last": "warn",
|
|
121
121
|
/*
|
|
122
122
|
* Enforce default parameters to be last
|
|
123
123
|
*
|
|
124
124
|
* https://eslint.org/docs/latest/rules/default-case
|
|
125
125
|
*/
|
|
126
|
-
"default-param-last": "
|
|
126
|
+
"default-param-last": "warn",
|
|
127
127
|
/*
|
|
128
128
|
* Enforce dot notation whenever possible
|
|
129
129
|
*
|
|
130
130
|
* https://eslint.org/docs/latest/rules/dot-notation
|
|
131
131
|
*/
|
|
132
|
-
"dot-notation": "
|
|
132
|
+
"dot-notation": "warn",
|
|
133
133
|
/*
|
|
134
134
|
* Require the use of === and !==
|
|
135
135
|
*
|
|
136
136
|
* https://eslint.org/docs/latest/rules/eqeqeq
|
|
137
137
|
*/
|
|
138
|
-
eqeqeq: "
|
|
138
|
+
eqeqeq: "warn",
|
|
139
139
|
/*
|
|
140
140
|
* Enforce “for” loop update clause moving the counter in the right direction.
|
|
141
141
|
*
|
|
142
142
|
* https://eslint.org/docs/latest/rules/for-direction
|
|
143
143
|
*/
|
|
144
|
-
"for-direction": "
|
|
144
|
+
"for-direction": "warn",
|
|
145
145
|
/*
|
|
146
146
|
* Require function names to match the name of the variable or property
|
|
147
147
|
* to which they are assigned
|
|
148
148
|
*
|
|
149
149
|
* https://eslint.org/docs/latest/rules/func-name-matching
|
|
150
150
|
*/
|
|
151
|
-
"func-name-matching": "
|
|
151
|
+
"func-name-matching": "warn",
|
|
152
152
|
/*
|
|
153
153
|
* Require or disallow named function expressions
|
|
154
154
|
*
|
|
155
155
|
* https://eslint.org/docs/latest/rules/func-names
|
|
156
156
|
*/
|
|
157
|
-
"func-names": ["
|
|
157
|
+
"func-names": ["warn", "as-needed"],
|
|
158
158
|
/*
|
|
159
159
|
* Enforce the consistent use of either function declarations or expressions
|
|
160
160
|
*
|
|
161
161
|
* https://eslint.org/docs/latest/rules/func-style
|
|
162
162
|
*/
|
|
163
|
-
"func-style": "
|
|
163
|
+
"func-style": "warn",
|
|
164
164
|
/*
|
|
165
165
|
* Enforce return statements in getters
|
|
166
166
|
*
|
|
167
167
|
* https://eslint.org/docs/latest/rules/getter-return
|
|
168
168
|
*/
|
|
169
|
-
"getter-return": "
|
|
169
|
+
"getter-return": "warn",
|
|
170
170
|
/*
|
|
171
171
|
* Require grouped accessor pairs in object literals and classes
|
|
172
172
|
*
|
|
173
173
|
* https://eslint.org/docs/latest/rules/grouped-accessor-pairs
|
|
174
174
|
*/
|
|
175
|
-
"grouped-accessor-pairs": "
|
|
175
|
+
"grouped-accessor-pairs": "warn",
|
|
176
176
|
/*
|
|
177
177
|
* Require for-in loops to include an if statement
|
|
178
178
|
*
|
|
179
179
|
* https://eslint.org/docs/latest/rules/guard-for-in
|
|
180
180
|
*/
|
|
181
|
-
"guard-for-in": "
|
|
181
|
+
"guard-for-in": "warn",
|
|
182
182
|
/*
|
|
183
183
|
* Disallow specified identifiers
|
|
184
184
|
*
|
|
185
185
|
* https://eslint.org/docs/latest/rules/id-denylist
|
|
186
186
|
*/
|
|
187
187
|
"id-denylist": [
|
|
188
|
-
"
|
|
188
|
+
"warn",
|
|
189
189
|
"e",
|
|
190
190
|
"i",
|
|
191
191
|
"j",
|
|
@@ -195,26 +195,26 @@ export const rules = [
|
|
|
195
195
|
*
|
|
196
196
|
* https://eslint.org/docs/latest/rules/id-length
|
|
197
197
|
*/
|
|
198
|
-
"id-length": "
|
|
198
|
+
"id-length": "warn",
|
|
199
199
|
/*
|
|
200
200
|
* Require identifiers to match a specified regular expression
|
|
201
201
|
*
|
|
202
202
|
* https://eslint.org/docs/latest/rules/id-match
|
|
203
203
|
*/
|
|
204
|
-
"id-match": "
|
|
204
|
+
"id-match": "warn",
|
|
205
205
|
/*
|
|
206
206
|
* Require or disallow initialization in variable declarations
|
|
207
207
|
*
|
|
208
208
|
* https://eslint.org/docs/latest/rules/init-declarations
|
|
209
209
|
*/
|
|
210
|
-
"init-declarations": "
|
|
210
|
+
"init-declarations": "warn",
|
|
211
211
|
/*
|
|
212
212
|
* Require or disallow logical assignment operator shorthand
|
|
213
213
|
*
|
|
214
214
|
* https://eslint.org/docs/latest/rules/logical-assignment-operators
|
|
215
215
|
*/
|
|
216
216
|
"logical-assignment-operators": [
|
|
217
|
-
"
|
|
217
|
+
"warn",
|
|
218
218
|
"always",
|
|
219
219
|
],
|
|
220
220
|
/*
|
|
@@ -222,20 +222,20 @@ export const rules = [
|
|
|
222
222
|
*
|
|
223
223
|
* https://eslint.org/docs/latest/rules/max-classes-per-file
|
|
224
224
|
*/
|
|
225
|
-
"max-classes-per-file": "
|
|
225
|
+
"max-classes-per-file": "warn",
|
|
226
226
|
/*
|
|
227
227
|
* Enforce a maximum depth that blocks can be nested
|
|
228
228
|
*
|
|
229
229
|
* https://eslint.org/docs/latest/rules/max-depth
|
|
230
230
|
*/
|
|
231
|
-
"max-depth": "
|
|
231
|
+
"max-depth": "warn",
|
|
232
232
|
/*
|
|
233
233
|
* Enforce a maximum number of lines per file
|
|
234
234
|
*
|
|
235
235
|
* https://eslint.org/docs/latest/rules/max-lines
|
|
236
236
|
*/
|
|
237
237
|
"max-lines": [
|
|
238
|
-
"
|
|
238
|
+
"warn",
|
|
239
239
|
{
|
|
240
240
|
max: MAXIMUM_FILE_LINE_COUNT,
|
|
241
241
|
},
|
|
@@ -246,7 +246,7 @@ export const rules = [
|
|
|
246
246
|
* https://eslint.org/docs/latest/rules/max-lines-per-function
|
|
247
247
|
*/
|
|
248
248
|
"max-lines-per-function": [
|
|
249
|
-
"
|
|
249
|
+
"warn",
|
|
250
250
|
{
|
|
251
251
|
max: 400,
|
|
252
252
|
},
|
|
@@ -257,7 +257,7 @@ export const rules = [
|
|
|
257
257
|
* https://eslint.org/docs/latest/rules/max-nested-callbacks
|
|
258
258
|
*/
|
|
259
259
|
"max-nested-callbacks": [
|
|
260
|
-
"
|
|
260
|
+
"warn",
|
|
261
261
|
{
|
|
262
262
|
max: 5,
|
|
263
263
|
},
|
|
@@ -268,7 +268,7 @@ export const rules = [
|
|
|
268
268
|
* https://eslint.org/docs/latest/rules/max-params
|
|
269
269
|
*/
|
|
270
270
|
"max-params": [
|
|
271
|
-
"
|
|
271
|
+
"warn",
|
|
272
272
|
{
|
|
273
273
|
max: MAX_FUNCTION_PARAMETERS,
|
|
274
274
|
},
|
|
@@ -279,7 +279,7 @@ export const rules = [
|
|
|
279
279
|
* https://eslint.org/docs/latest/rules/max-statements
|
|
280
280
|
*/
|
|
281
281
|
"max-statements": [
|
|
282
|
-
"
|
|
282
|
+
"warn",
|
|
283
283
|
{
|
|
284
284
|
max: 80,
|
|
285
285
|
},
|
|
@@ -290,7 +290,7 @@ export const rules = [
|
|
|
290
290
|
* https://eslint.org/docs/latest/rules/new-cap
|
|
291
291
|
*/
|
|
292
292
|
"new-cap": [
|
|
293
|
-
"
|
|
293
|
+
"warn",
|
|
294
294
|
{
|
|
295
295
|
properties: false,
|
|
296
296
|
},
|
|
@@ -300,61 +300,61 @@ export const rules = [
|
|
|
300
300
|
*
|
|
301
301
|
* https://eslint.org/docs/latest/rules/no-alert
|
|
302
302
|
*/
|
|
303
|
-
"no-alert": "
|
|
303
|
+
"no-alert": "warn",
|
|
304
304
|
/*
|
|
305
305
|
* Disallow Array constructors
|
|
306
306
|
*
|
|
307
307
|
* https://eslint.org/docs/latest/rules/no-array-constructor
|
|
308
308
|
*/
|
|
309
|
-
"no-array-constructor": "
|
|
309
|
+
"no-array-constructor": "warn",
|
|
310
310
|
/*
|
|
311
311
|
* Disallow using an async function as a Promise executor
|
|
312
312
|
*
|
|
313
313
|
* https://eslint.org/docs/latest/rules/no-async-promise-executor
|
|
314
314
|
*/
|
|
315
|
-
"no-async-promise-executor": "
|
|
315
|
+
"no-async-promise-executor": "warn",
|
|
316
316
|
/*
|
|
317
317
|
* Disallow await inside of loops
|
|
318
318
|
*
|
|
319
319
|
* https://eslint.org/docs/latest/rules/no-await-in-loop
|
|
320
320
|
*/
|
|
321
|
-
"no-await-in-loop": "
|
|
321
|
+
"no-await-in-loop": "warn",
|
|
322
322
|
/*
|
|
323
323
|
* Disallow bitwise operators
|
|
324
324
|
*
|
|
325
325
|
* https://eslint.org/docs/latest/rules/no-bitwise
|
|
326
326
|
*/
|
|
327
|
-
"no-bitwise": "
|
|
327
|
+
"no-bitwise": "warn",
|
|
328
328
|
/*
|
|
329
329
|
* Disallow the use of arguments.caller or arguments.callee
|
|
330
330
|
*
|
|
331
331
|
* https://eslint.org/docs/latest/rules/no-caller
|
|
332
332
|
*/
|
|
333
|
-
"no-caller": "
|
|
333
|
+
"no-caller": "warn",
|
|
334
334
|
/*
|
|
335
335
|
* Disallow lexical declarations in case clauses
|
|
336
336
|
*
|
|
337
337
|
* https://eslint.org/docs/latest/rules/no-case-declarations
|
|
338
338
|
*/
|
|
339
|
-
"no-case-declarations": "
|
|
339
|
+
"no-case-declarations": "warn",
|
|
340
340
|
/*
|
|
341
341
|
* Disallow reassigning class members
|
|
342
342
|
*
|
|
343
343
|
* https://eslint.org/docs/latest/rules/no-class-assign
|
|
344
344
|
*/
|
|
345
|
-
"no-class-assign": "
|
|
345
|
+
"no-class-assign": "warn",
|
|
346
346
|
/*
|
|
347
347
|
* Disallow comparing against -0
|
|
348
348
|
*
|
|
349
349
|
* https://eslint.org/docs/latest/rules/no-compare-neg-zero
|
|
350
350
|
*/
|
|
351
|
-
"no-compare-neg-zero": "
|
|
351
|
+
"no-compare-neg-zero": "warn",
|
|
352
352
|
/*
|
|
353
353
|
* Disallow assignment operators in conditional expressions
|
|
354
354
|
*
|
|
355
355
|
* https://eslint.org/docs/latest/rules/no-cond-assign
|
|
356
356
|
*/
|
|
357
|
-
"no-cond-assign": "
|
|
357
|
+
"no-cond-assign": "warn",
|
|
358
358
|
/*
|
|
359
359
|
* Disallow the use of console
|
|
360
360
|
*
|
|
@@ -368,104 +368,104 @@ export const rules = [
|
|
|
368
368
|
*
|
|
369
369
|
* https://eslint.org/docs/latest/rules/no-const-assign
|
|
370
370
|
*/
|
|
371
|
-
"no-const-assign": "
|
|
371
|
+
"no-const-assign": "warn",
|
|
372
372
|
/*
|
|
373
373
|
* Disallows expressions where the operation doesn't affect the value.
|
|
374
374
|
*
|
|
375
375
|
* https://eslint.org/docs/latest/rules/no-constant-binary-expression
|
|
376
376
|
*/
|
|
377
|
-
"no-constant-binary-expression": "
|
|
377
|
+
"no-constant-binary-expression": "warn",
|
|
378
378
|
/*
|
|
379
379
|
* Disallow constant expressions in conditions
|
|
380
380
|
*
|
|
381
381
|
* https://eslint.org/docs/latest/rules/no-constant-condition
|
|
382
382
|
*/
|
|
383
|
-
"no-constant-condition": "
|
|
383
|
+
"no-constant-condition": "warn",
|
|
384
384
|
/*
|
|
385
385
|
* Disallow returning value from constructor
|
|
386
386
|
*
|
|
387
387
|
* https://eslint.org/docs/latest/rules/no-constructor-return
|
|
388
388
|
*/
|
|
389
|
-
"no-constructor-return": "
|
|
389
|
+
"no-constructor-return": "warn",
|
|
390
390
|
/*
|
|
391
391
|
* Disallow continue statements
|
|
392
392
|
*
|
|
393
393
|
* https://eslint.org/docs/latest/rules/no-continue
|
|
394
394
|
*/
|
|
395
|
-
"no-continue": "
|
|
395
|
+
"no-continue": "warn",
|
|
396
396
|
/*
|
|
397
397
|
* Disallow control characters in regular expressions
|
|
398
398
|
*
|
|
399
399
|
* https://eslint.org/docs/latest/rules/no-control-regex
|
|
400
400
|
*/
|
|
401
|
-
"no-control-regex": "
|
|
401
|
+
"no-control-regex": "warn",
|
|
402
402
|
/*
|
|
403
403
|
* Disallow the use of debugger
|
|
404
404
|
*
|
|
405
405
|
* https://eslint.org/docs/latest/rules/no-debugger
|
|
406
406
|
*/
|
|
407
|
-
"no-debugger": "
|
|
407
|
+
"no-debugger": "warn",
|
|
408
408
|
/*
|
|
409
409
|
* Disallow deleting variables
|
|
410
410
|
*
|
|
411
411
|
* https://eslint.org/docs/latest/rules/no-delete-var
|
|
412
412
|
*/
|
|
413
|
-
"no-delete-var": "
|
|
413
|
+
"no-delete-var": "warn",
|
|
414
414
|
/*
|
|
415
415
|
* Disallow division operators explicitly at the beginning of regular expressions
|
|
416
416
|
*
|
|
417
417
|
* https://eslint.org/docs/latest/rules/no-div-regex
|
|
418
418
|
*/
|
|
419
|
-
"no-div-regex": "
|
|
419
|
+
"no-div-regex": "warn",
|
|
420
420
|
/*
|
|
421
421
|
* Disallow duplicate arguments in function definitions
|
|
422
422
|
*
|
|
423
423
|
* https://eslint.org/docs/latest/rules/no-dupe-args
|
|
424
424
|
*/
|
|
425
|
-
"no-dupe-args": "
|
|
425
|
+
"no-dupe-args": "warn",
|
|
426
426
|
/*
|
|
427
427
|
* Disallow duplicate class members
|
|
428
428
|
*
|
|
429
429
|
* https://eslint.org/docs/latest/rules/no-dupe-class-members
|
|
430
430
|
*/
|
|
431
|
-
"no-dupe-class-members": "
|
|
431
|
+
"no-dupe-class-members": "warn",
|
|
432
432
|
/*
|
|
433
433
|
* Disallow duplicate conditions in if-else-if chains
|
|
434
434
|
*
|
|
435
435
|
* https://eslint.org/docs/latest/rules/no-dupe-else-if
|
|
436
436
|
*/
|
|
437
|
-
"no-dupe-else-if": "
|
|
437
|
+
"no-dupe-else-if": "warn",
|
|
438
438
|
/*
|
|
439
439
|
* Disallow duplicate keys in object literals
|
|
440
440
|
*
|
|
441
441
|
* https://eslint.org/docs/latest/rules/no-dupe-keys
|
|
442
442
|
*/
|
|
443
|
-
"no-dupe-keys": "
|
|
443
|
+
"no-dupe-keys": "warn",
|
|
444
444
|
/*
|
|
445
445
|
* Disallow duplicate case labels
|
|
446
446
|
*
|
|
447
447
|
* https://eslint.org/docs/latest/rules/no-duplicate-case
|
|
448
448
|
*/
|
|
449
|
-
"no-duplicate-case": "
|
|
449
|
+
"no-duplicate-case": "warn",
|
|
450
450
|
/*
|
|
451
451
|
* Disallow duplicate module imports
|
|
452
452
|
*
|
|
453
453
|
* https://eslint.org/docs/latest/rules/no-duplicate-imports
|
|
454
454
|
*/
|
|
455
|
-
"no-duplicate-imports": "
|
|
455
|
+
"no-duplicate-imports": "warn",
|
|
456
456
|
/*
|
|
457
457
|
* Disallow else blocks after return statements in if statements
|
|
458
458
|
*
|
|
459
459
|
* https://eslint.org/docs/latest/rules/no-else-return
|
|
460
460
|
*/
|
|
461
|
-
"no-else-return": "
|
|
461
|
+
"no-else-return": "warn",
|
|
462
462
|
/*
|
|
463
463
|
* Disallow empty block statements
|
|
464
464
|
*
|
|
465
465
|
* https://eslint.org/docs/latest/rules/no-empty
|
|
466
466
|
*/
|
|
467
467
|
"no-empty": [
|
|
468
|
-
"
|
|
468
|
+
"warn",
|
|
469
469
|
{
|
|
470
470
|
allowEmptyCatch: true,
|
|
471
471
|
},
|
|
@@ -475,116 +475,116 @@ export const rules = [
|
|
|
475
475
|
*
|
|
476
476
|
* https://eslint.org/docs/latest/rules/no-empty-character-class
|
|
477
477
|
*/
|
|
478
|
-
"no-empty-character-class": "
|
|
478
|
+
"no-empty-character-class": "warn",
|
|
479
479
|
/*
|
|
480
480
|
* Disallow empty functions
|
|
481
481
|
*
|
|
482
482
|
* https://eslint.org/docs/latest/rules/no-empty-function
|
|
483
483
|
*/
|
|
484
|
-
"no-empty-function": "
|
|
484
|
+
"no-empty-function": "warn",
|
|
485
485
|
/*
|
|
486
486
|
* Disallow empty destructuring patterns
|
|
487
487
|
*
|
|
488
488
|
* https://eslint.org/docs/latest/rules/no-empty-pattern
|
|
489
489
|
*/
|
|
490
|
-
"no-empty-pattern": "
|
|
490
|
+
"no-empty-pattern": "warn",
|
|
491
491
|
/*
|
|
492
492
|
* Disallow empty static blocks
|
|
493
493
|
*
|
|
494
494
|
* https://eslint.org/docs/latest/rules/no-empty-pattern
|
|
495
495
|
*/
|
|
496
|
-
"no-empty-static-block": "
|
|
496
|
+
"no-empty-static-block": "warn",
|
|
497
497
|
/*
|
|
498
498
|
* Disallow null comparisons without type-checking operators
|
|
499
499
|
*
|
|
500
500
|
* https://eslint.org/docs/latest/rules/no-eq-null
|
|
501
501
|
*/
|
|
502
|
-
"no-eq-null": "
|
|
502
|
+
"no-eq-null": "warn",
|
|
503
503
|
/*
|
|
504
504
|
* Disallow the use of eval()
|
|
505
505
|
*
|
|
506
506
|
* https://eslint.org/docs/latest/rules/no-eval
|
|
507
507
|
*/
|
|
508
|
-
"no-eval": "
|
|
508
|
+
"no-eval": "warn",
|
|
509
509
|
/*
|
|
510
510
|
* Disallow reassigning exceptions in catch clauses
|
|
511
511
|
*
|
|
512
512
|
* https://eslint.org/docs/latest/rules/no-ex-assign
|
|
513
513
|
*/
|
|
514
|
-
"no-ex-assign": "
|
|
514
|
+
"no-ex-assign": "warn",
|
|
515
515
|
/*
|
|
516
516
|
* Disallow extending native types
|
|
517
517
|
*
|
|
518
518
|
* https://eslint.org/docs/latest/rules/no-extend-native
|
|
519
519
|
*/
|
|
520
|
-
"no-extend-native": "
|
|
520
|
+
"no-extend-native": "warn",
|
|
521
521
|
/*
|
|
522
522
|
* Disallow unnecessary calls to .bind()
|
|
523
523
|
*
|
|
524
524
|
* https://eslint.org/docs/latest/rules/no-extra-bind
|
|
525
525
|
*/
|
|
526
|
-
"no-extra-bind": "
|
|
526
|
+
"no-extra-bind": "warn",
|
|
527
527
|
/*
|
|
528
528
|
* Disallow unnecessary boolean casts
|
|
529
529
|
*
|
|
530
530
|
* https://eslint.org/docs/latest/rules/no-extra-boolean-cast
|
|
531
531
|
*/
|
|
532
|
-
"no-extra-boolean-cast": "
|
|
532
|
+
"no-extra-boolean-cast": "warn",
|
|
533
533
|
/*
|
|
534
534
|
* Disallow unnecessary labels
|
|
535
535
|
*
|
|
536
536
|
* https://eslint.org/docs/latest/rules/no-extra-label
|
|
537
537
|
*/
|
|
538
|
-
"no-extra-label": "
|
|
538
|
+
"no-extra-label": "warn",
|
|
539
539
|
/*
|
|
540
540
|
* Disallow fallthrough of case statements
|
|
541
541
|
*
|
|
542
542
|
* https://eslint.org/docs/latest/rules/no-fallthrough
|
|
543
543
|
*/
|
|
544
|
-
"no-fallthrough": "
|
|
544
|
+
"no-fallthrough": "warn",
|
|
545
545
|
/*
|
|
546
546
|
* Disallow reassigning function declarations
|
|
547
547
|
*
|
|
548
548
|
* https://eslint.org/docs/latest/rules/no-func-assign
|
|
549
549
|
*/
|
|
550
|
-
"no-func-assign": "
|
|
550
|
+
"no-func-assign": "warn",
|
|
551
551
|
/*
|
|
552
552
|
* Disallow assignments to native objects or read-only global variables
|
|
553
553
|
*
|
|
554
554
|
* https://eslint.org/docs/latest/rules/no-global-assign
|
|
555
555
|
*/
|
|
556
|
-
"no-global-assign": "
|
|
556
|
+
"no-global-assign": "warn",
|
|
557
557
|
/*
|
|
558
558
|
* Disallow shorthand type conversions
|
|
559
559
|
*
|
|
560
560
|
* https://eslint.org/docs/latest/rules/no-implicit-coercion
|
|
561
561
|
*/
|
|
562
|
-
"no-implicit-coercion": "
|
|
562
|
+
"no-implicit-coercion": "warn",
|
|
563
563
|
/*
|
|
564
564
|
* Disallow variable and function declarations in the global scope
|
|
565
565
|
*
|
|
566
566
|
* https://eslint.org/docs/latest/rules/no-implicit-globals
|
|
567
567
|
*/
|
|
568
|
-
"no-implicit-globals": "
|
|
568
|
+
"no-implicit-globals": "warn",
|
|
569
569
|
/*
|
|
570
570
|
* Disallow the use of eval()-like methods
|
|
571
571
|
*
|
|
572
572
|
* https://eslint.org/docs/latest/rules/no-implied-eval
|
|
573
573
|
*/
|
|
574
|
-
"no-implied-eval": "
|
|
574
|
+
"no-implied-eval": "warn",
|
|
575
575
|
/*
|
|
576
576
|
* Disallow assigning to imported bindings
|
|
577
577
|
*
|
|
578
578
|
* https://eslint.org/docs/latest/rules/no-import-assign
|
|
579
579
|
*/
|
|
580
|
-
"no-import-assign": "
|
|
580
|
+
"no-import-assign": "warn",
|
|
581
581
|
/*
|
|
582
582
|
* Disallow inline comments after code
|
|
583
583
|
*
|
|
584
584
|
* https://eslint.org/docs/latest/rules/no-inline-comments
|
|
585
585
|
*/
|
|
586
586
|
"no-inline-comments": [
|
|
587
|
-
"
|
|
587
|
+
"warn",
|
|
588
588
|
{
|
|
589
589
|
ignorePattern: String.raw `webpackChunkName:\s.+`,
|
|
590
590
|
},
|
|
@@ -594,74 +594,74 @@ export const rules = [
|
|
|
594
594
|
*
|
|
595
595
|
* https://eslint.org/docs/latest/rules/no-inner-declarations
|
|
596
596
|
*/
|
|
597
|
-
"no-inner-declarations": "
|
|
597
|
+
"no-inner-declarations": "warn",
|
|
598
598
|
/*
|
|
599
599
|
* Disallow invalid regular expression strings in RegExp constructors
|
|
600
600
|
*
|
|
601
601
|
* https://eslint.org/docs/latest/rules/no-invalid-regexp
|
|
602
602
|
*/
|
|
603
|
-
"no-invalid-regexp": "
|
|
603
|
+
"no-invalid-regexp": "warn",
|
|
604
604
|
/*
|
|
605
605
|
* Disallow this keywords outside of classes or class-like objects
|
|
606
606
|
*
|
|
607
607
|
* https://eslint.org/docs/latest/rules/no-invalid-this
|
|
608
608
|
*/
|
|
609
|
-
"no-invalid-this": "
|
|
609
|
+
"no-invalid-this": "warn",
|
|
610
610
|
/*
|
|
611
611
|
* Disallow irregular whitespace
|
|
612
612
|
*
|
|
613
613
|
* https://eslint.org/docs/latest/rules/no-irregular-whitespace
|
|
614
614
|
*/
|
|
615
|
-
"no-irregular-whitespace": "
|
|
615
|
+
"no-irregular-whitespace": "warn",
|
|
616
616
|
/*
|
|
617
617
|
* Disallow the use of the __iterator__ property
|
|
618
618
|
*
|
|
619
619
|
* https://eslint.org/docs/latest/rules/no-iterator
|
|
620
620
|
*/
|
|
621
|
-
"no-iterator": "
|
|
621
|
+
"no-iterator": "warn",
|
|
622
622
|
/*
|
|
623
623
|
* Disallow labels that share a name with a variable
|
|
624
624
|
*
|
|
625
625
|
* https://eslint.org/docs/latest/rules/no-label-var
|
|
626
626
|
*/
|
|
627
|
-
"no-label-var": "
|
|
627
|
+
"no-label-var": "warn",
|
|
628
628
|
/*
|
|
629
629
|
* Disallow labeled statements
|
|
630
630
|
*
|
|
631
631
|
* https://eslint.org/docs/latest/rules/no-labels
|
|
632
632
|
*/
|
|
633
|
-
"no-labels": "
|
|
633
|
+
"no-labels": "warn",
|
|
634
634
|
/*
|
|
635
635
|
* Disallow unnecessary nested blocks
|
|
636
636
|
*
|
|
637
637
|
* https://eslint.org/docs/latest/rules/no-lone-blocks
|
|
638
638
|
*/
|
|
639
|
-
"no-lone-blocks": "
|
|
639
|
+
"no-lone-blocks": "warn",
|
|
640
640
|
/*
|
|
641
641
|
* Disallow if statements as the only statement in else blocks
|
|
642
642
|
*
|
|
643
643
|
* https://eslint.org/docs/latest/rules/no-lonely-if
|
|
644
644
|
*/
|
|
645
|
-
"no-lonely-if": "
|
|
645
|
+
"no-lonely-if": "warn",
|
|
646
646
|
/*
|
|
647
647
|
* Disallow function declarations and expressions inside loop statements
|
|
648
648
|
*
|
|
649
649
|
* https://eslint.org/docs/latest/rules/no-loop-func
|
|
650
650
|
*/
|
|
651
|
-
"no-loop-func": "
|
|
651
|
+
"no-loop-func": "warn",
|
|
652
652
|
/*
|
|
653
653
|
* Disallow Number Literals That Lose Precision
|
|
654
654
|
*
|
|
655
655
|
* https://eslint.org/docs/latest/rules/no-loss-of-precision
|
|
656
656
|
*/
|
|
657
|
-
"no-loss-of-precision": "
|
|
657
|
+
"no-loss-of-precision": "warn",
|
|
658
658
|
/*
|
|
659
659
|
* Disallow magic numbers
|
|
660
660
|
*
|
|
661
661
|
* https://eslint.org/docs/latest/rules/no-magic-numbers
|
|
662
662
|
*/
|
|
663
663
|
"no-magic-numbers": [
|
|
664
|
-
"
|
|
664
|
+
"warn",
|
|
665
665
|
NO_MAGIC_NUMBERS_CONFIG,
|
|
666
666
|
],
|
|
667
667
|
/*
|
|
@@ -670,19 +670,19 @@ export const rules = [
|
|
|
670
670
|
*
|
|
671
671
|
* https://eslint.org/docs/latest/rules/no-misleading-character-class
|
|
672
672
|
*/
|
|
673
|
-
"no-misleading-character-class": "
|
|
673
|
+
"no-misleading-character-class": "warn",
|
|
674
674
|
/*
|
|
675
675
|
* Disallow use of chained assignment expressions
|
|
676
676
|
*
|
|
677
677
|
* https://eslint.org/docs/latest/rules/no-multi-assign
|
|
678
678
|
*/
|
|
679
|
-
"no-multi-assign": "
|
|
679
|
+
"no-multi-assign": "warn",
|
|
680
680
|
/*
|
|
681
681
|
* Disallow multiline strings
|
|
682
682
|
*
|
|
683
683
|
* https://eslint.org/docs/latest/rules/no-multi-str
|
|
684
684
|
*/
|
|
685
|
-
"no-multi-str": "
|
|
685
|
+
"no-multi-str": "warn",
|
|
686
686
|
/*
|
|
687
687
|
* Disallow negated conditions
|
|
688
688
|
*
|
|
@@ -704,62 +704,62 @@ export const rules = [
|
|
|
704
704
|
*
|
|
705
705
|
* https://eslint.org/docs/latest/rules/no-new
|
|
706
706
|
*/
|
|
707
|
-
"no-new": "
|
|
707
|
+
"no-new": "warn",
|
|
708
708
|
/*
|
|
709
709
|
* Disallow new operators with the Function object
|
|
710
710
|
*
|
|
711
711
|
* https://eslint.org/docs/latest/rules/no-new-func
|
|
712
712
|
*/
|
|
713
|
-
"no-new-func": "
|
|
713
|
+
"no-new-func": "warn",
|
|
714
714
|
/*
|
|
715
715
|
* Disallow new operators with global non-constructor functions
|
|
716
716
|
*
|
|
717
717
|
* https://eslint.org/docs/latest/rules/no-new-native-nonconstructor
|
|
718
718
|
*/
|
|
719
|
-
"no-new-native-nonconstructor": "
|
|
719
|
+
"no-new-native-nonconstructor": "warn",
|
|
720
720
|
/*
|
|
721
721
|
* Disallow new operators with the String, Number, and Boolean objects
|
|
722
722
|
*
|
|
723
723
|
* https://eslint.org/docs/latest/rules/no-new-wrappers
|
|
724
724
|
*/
|
|
725
|
-
"no-new-wrappers": "
|
|
725
|
+
"no-new-wrappers": "warn",
|
|
726
726
|
/*
|
|
727
727
|
* Disallow \8 and \9 escape sequences in string literals (no-nonoctal-decimal-escape)
|
|
728
728
|
*
|
|
729
729
|
* https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape
|
|
730
730
|
*/
|
|
731
|
-
"no-nonoctal-decimal-escape": "
|
|
731
|
+
"no-nonoctal-decimal-escape": "warn",
|
|
732
732
|
/*
|
|
733
733
|
* Disallow calling global object properties as functions
|
|
734
734
|
*
|
|
735
735
|
* https://eslint.org/docs/latest/rules/no-obj-calls
|
|
736
736
|
*/
|
|
737
|
-
"no-obj-calls": "
|
|
737
|
+
"no-obj-calls": "warn",
|
|
738
738
|
/*
|
|
739
739
|
* Disallow Object constructors
|
|
740
740
|
*
|
|
741
741
|
* https://eslint.org/docs/latest/rules/no-object-constructor
|
|
742
742
|
*/
|
|
743
|
-
"no-object-constructor": "
|
|
743
|
+
"no-object-constructor": "warn",
|
|
744
744
|
/*
|
|
745
745
|
* Disallow octal literals
|
|
746
746
|
*
|
|
747
747
|
* https://eslint.org/docs/latest/rules/no-octal
|
|
748
748
|
*/
|
|
749
|
-
"no-octal": "
|
|
749
|
+
"no-octal": "warn",
|
|
750
750
|
/*
|
|
751
751
|
* Disallow octal escape sequences in string literals
|
|
752
752
|
*
|
|
753
753
|
* https://eslint.org/docs/latest/rules/no-octal-escape
|
|
754
754
|
*/
|
|
755
|
-
"no-octal-escape": "
|
|
755
|
+
"no-octal-escape": "warn",
|
|
756
756
|
/*
|
|
757
757
|
* Disallow reassigning function parameters
|
|
758
758
|
*
|
|
759
759
|
* https://eslint.org/docs/latest/rules/no-param-reassign
|
|
760
760
|
*/
|
|
761
761
|
"no-param-reassign": [
|
|
762
|
-
"
|
|
762
|
+
"warn",
|
|
763
763
|
{
|
|
764
764
|
ignorePropertyModificationsFor: [
|
|
765
765
|
// Reduce accumulators
|
|
@@ -784,7 +784,7 @@ export const rules = [
|
|
|
784
784
|
* https://eslint.org/docs/latest/rules/no-plusplus
|
|
785
785
|
*/
|
|
786
786
|
"no-plusplus": [
|
|
787
|
-
"
|
|
787
|
+
"warn",
|
|
788
788
|
{
|
|
789
789
|
allowForLoopAfterthoughts: true,
|
|
790
790
|
},
|
|
@@ -794,31 +794,31 @@ export const rules = [
|
|
|
794
794
|
*
|
|
795
795
|
* https://eslint.org/docs/latest/rules/no-promise-executor-return
|
|
796
796
|
*/
|
|
797
|
-
"no-promise-executor-return": "
|
|
797
|
+
"no-promise-executor-return": "warn",
|
|
798
798
|
/*
|
|
799
799
|
* Disallow the use of the __proto__ property
|
|
800
800
|
*
|
|
801
801
|
* https://eslint.org/docs/latest/rules/no-proto
|
|
802
802
|
*/
|
|
803
|
-
"no-proto": "
|
|
803
|
+
"no-proto": "warn",
|
|
804
804
|
/*
|
|
805
805
|
* Disallow calling some Object.prototype methods directly on objects
|
|
806
806
|
*
|
|
807
807
|
* https://eslint.org/docs/latest/rules/no-prototype-builtins
|
|
808
808
|
*/
|
|
809
|
-
"no-prototype-builtins": "
|
|
809
|
+
"no-prototype-builtins": "warn",
|
|
810
810
|
/*
|
|
811
811
|
* Disallow variable redeclaration
|
|
812
812
|
*
|
|
813
813
|
* https://eslint.org/docs/latest/rules/no-redeclare
|
|
814
814
|
*/
|
|
815
|
-
"no-redeclare": "
|
|
815
|
+
"no-redeclare": "warn",
|
|
816
816
|
/*
|
|
817
817
|
* Disallow multiple spaces in regular expressions
|
|
818
818
|
*
|
|
819
819
|
* https://eslint.org/docs/latest/rules/no-regex-spaces
|
|
820
820
|
*/
|
|
821
|
-
"no-regex-spaces": "
|
|
821
|
+
"no-regex-spaces": "warn",
|
|
822
822
|
/*
|
|
823
823
|
* This rule disallows specified names from being used as exported names.
|
|
824
824
|
*
|
|
@@ -835,7 +835,7 @@ export const rules = [
|
|
|
835
835
|
* https://eslint.org/docs/latest/rules/no-restricted-globals
|
|
836
836
|
*/
|
|
837
837
|
"no-restricted-globals": [
|
|
838
|
-
"
|
|
838
|
+
"warn",
|
|
839
839
|
"isFinite",
|
|
840
840
|
"isNaN",
|
|
841
841
|
...confusingBrowserGlobals,
|
|
@@ -856,7 +856,7 @@ export const rules = [
|
|
|
856
856
|
* https://eslint.org/docs/latest/rules/no-restricted-properties
|
|
857
857
|
*/
|
|
858
858
|
"no-restricted-properties": [
|
|
859
|
-
"
|
|
859
|
+
"warn",
|
|
860
860
|
{
|
|
861
861
|
message: "arguments.callee is deprecated",
|
|
862
862
|
object: "arguments",
|
|
@@ -911,68 +911,68 @@ export const rules = [
|
|
|
911
911
|
*
|
|
912
912
|
* https://eslint.org/docs/latest/rules/no-restricted-syntax
|
|
913
913
|
*/
|
|
914
|
-
"no-restricted-syntax": "
|
|
914
|
+
"no-restricted-syntax": "warn",
|
|
915
915
|
/*
|
|
916
916
|
* Disallow assignment operators in return statements
|
|
917
917
|
*
|
|
918
918
|
* https://eslint.org/docs/latest/rules/no-return-assign
|
|
919
919
|
*/
|
|
920
|
-
"no-return-assign": "
|
|
920
|
+
"no-return-assign": "warn",
|
|
921
921
|
/*
|
|
922
922
|
* Disallow javascript: urls
|
|
923
923
|
*
|
|
924
924
|
* https://eslint.org/docs/latest/rules/no-script-url
|
|
925
925
|
*/
|
|
926
|
-
"no-script-url": "
|
|
926
|
+
"no-script-url": "warn",
|
|
927
927
|
/*
|
|
928
928
|
* Disallow assignments where both sides are exactly the same
|
|
929
929
|
*
|
|
930
930
|
* https://eslint.org/docs/latest/rules/no-self-assign
|
|
931
931
|
*/
|
|
932
|
-
"no-self-assign": "
|
|
932
|
+
"no-self-assign": "warn",
|
|
933
933
|
/*
|
|
934
934
|
* Disallow comparisons where both sides are exactly the same
|
|
935
935
|
*
|
|
936
936
|
* https://eslint.org/docs/latest/rules/no-self-compare
|
|
937
937
|
*/
|
|
938
|
-
"no-self-compare": "
|
|
938
|
+
"no-self-compare": "warn",
|
|
939
939
|
/*
|
|
940
940
|
* Disallow comma operators
|
|
941
941
|
*
|
|
942
942
|
* https://eslint.org/docs/latest/rules/no-sequences
|
|
943
943
|
*/
|
|
944
|
-
"no-sequences": "
|
|
944
|
+
"no-sequences": "warn",
|
|
945
945
|
/*
|
|
946
946
|
* Disallow returning values from setters
|
|
947
947
|
*
|
|
948
948
|
* https://eslint.org/docs/latest/rules/no-setter-return
|
|
949
949
|
*/
|
|
950
|
-
"no-setter-return": "
|
|
950
|
+
"no-setter-return": "warn",
|
|
951
951
|
/*
|
|
952
952
|
* Disallow variable declarations from shadowing variables declared in
|
|
953
953
|
* the outer scope
|
|
954
954
|
*
|
|
955
955
|
* https://eslint.org/docs/latest/rules/no-shadow
|
|
956
956
|
*/
|
|
957
|
-
"no-shadow": "
|
|
957
|
+
"no-shadow": "warn",
|
|
958
958
|
/*
|
|
959
959
|
* Disallow identifiers from shadowing restricted names
|
|
960
960
|
*
|
|
961
961
|
* https://eslint.org/docs/latest/rules/no-shadow-restricted-names
|
|
962
962
|
*/
|
|
963
|
-
"no-shadow-restricted-names": "
|
|
963
|
+
"no-shadow-restricted-names": "warn",
|
|
964
964
|
/*
|
|
965
965
|
* Disallow sparse arrays
|
|
966
966
|
*
|
|
967
967
|
* https://eslint.org/docs/latest/rules/no-sparse-arrays
|
|
968
968
|
*/
|
|
969
|
-
"no-sparse-arrays": "
|
|
969
|
+
"no-sparse-arrays": "warn",
|
|
970
970
|
/*
|
|
971
971
|
* Disallow template literal placeholder syntax in regular strings
|
|
972
972
|
*
|
|
973
973
|
* https://eslint.org/docs/latest/rules/no-template-curly-in-string
|
|
974
974
|
*/
|
|
975
|
-
"no-template-curly-in-string": "
|
|
975
|
+
"no-template-curly-in-string": "warn",
|
|
976
976
|
/*
|
|
977
977
|
* Disallow ternary operators
|
|
978
978
|
*
|
|
@@ -986,117 +986,117 @@ export const rules = [
|
|
|
986
986
|
*
|
|
987
987
|
* https://eslint.org/docs/latest/rules/no-this-before-super
|
|
988
988
|
*/
|
|
989
|
-
"no-this-before-super": "
|
|
989
|
+
"no-this-before-super": "warn",
|
|
990
990
|
/*
|
|
991
991
|
* Disallow throwing literals as exceptions
|
|
992
992
|
*
|
|
993
993
|
* https://eslint.org/docs/latest/rules/no-throw-literal
|
|
994
994
|
*/
|
|
995
|
-
"no-throw-literal": "
|
|
995
|
+
"no-throw-literal": "warn",
|
|
996
996
|
/*
|
|
997
997
|
* Disallow let or var variables that are read but never assigned
|
|
998
998
|
*
|
|
999
999
|
* https://eslint.org/docs/latest/rules/no-unassigned-vars
|
|
1000
1000
|
*/
|
|
1001
|
-
"no-unassigned-vars": "
|
|
1001
|
+
"no-unassigned-vars": "warn",
|
|
1002
1002
|
/*
|
|
1003
1003
|
* Disallow the use of undeclared variables unless mentioned in
|
|
1004
1004
|
* \/* global *\/ comments.
|
|
1005
1005
|
*
|
|
1006
1006
|
* https://eslint.org/docs/latest/rules/no-undef
|
|
1007
1007
|
*/
|
|
1008
|
-
"no-undef": "
|
|
1008
|
+
"no-undef": "warn",
|
|
1009
1009
|
/*
|
|
1010
1010
|
* Disallow initializing variables to undefined
|
|
1011
1011
|
*
|
|
1012
1012
|
* https://eslint.org/docs/latest/rules/no-undef-init
|
|
1013
1013
|
*/
|
|
1014
|
-
"no-undef-init": "
|
|
1014
|
+
"no-undef-init": "warn",
|
|
1015
1015
|
/*
|
|
1016
1016
|
* Disallow the use of undefined as an identifier
|
|
1017
1017
|
*
|
|
1018
1018
|
* https://eslint.org/docs/latest/rules/no-undefined
|
|
1019
1019
|
*/
|
|
1020
|
-
"no-undefined": "
|
|
1020
|
+
"no-undefined": "warn",
|
|
1021
1021
|
/*
|
|
1022
1022
|
* Disallow dangling underscores in identifiers
|
|
1023
1023
|
*
|
|
1024
1024
|
* https://eslint.org/docs/latest/rules/no-underscore-dangle
|
|
1025
1025
|
*/
|
|
1026
|
-
"no-underscore-dangle": "
|
|
1026
|
+
"no-underscore-dangle": "warn",
|
|
1027
1027
|
/*
|
|
1028
1028
|
* Disallow confusing multiline expressions
|
|
1029
1029
|
*
|
|
1030
1030
|
* https://eslint.org/docs/latest/rules/no-unexpected-multiline
|
|
1031
1031
|
*/
|
|
1032
|
-
"no-unexpected-multiline": "
|
|
1032
|
+
"no-unexpected-multiline": "warn",
|
|
1033
1033
|
/*
|
|
1034
1034
|
* Disallow unmodified loop conditions
|
|
1035
1035
|
*
|
|
1036
1036
|
* https://eslint.org/docs/latest/rules/no-unmodified-loop-condition
|
|
1037
1037
|
*/
|
|
1038
|
-
"no-unmodified-loop-condition": "
|
|
1038
|
+
"no-unmodified-loop-condition": "warn",
|
|
1039
1039
|
/*
|
|
1040
1040
|
* Disallow ternary operators when simpler alternatives exist
|
|
1041
1041
|
*
|
|
1042
1042
|
* https://eslint.org/docs/latest/rules/no-unneeded-ternary
|
|
1043
1043
|
*/
|
|
1044
|
-
"no-unneeded-ternary": "
|
|
1044
|
+
"no-unneeded-ternary": "warn",
|
|
1045
1045
|
/*
|
|
1046
1046
|
* Disallow unreachable code after return, throw, continue, and break statements
|
|
1047
1047
|
*
|
|
1048
1048
|
* https://eslint.org/docs/latest/rules/no-unreachable
|
|
1049
1049
|
*/
|
|
1050
|
-
"no-unreachable": "
|
|
1050
|
+
"no-unreachable": "warn",
|
|
1051
1051
|
/*
|
|
1052
1052
|
* Disallow loops with a body that allows only one iteration
|
|
1053
1053
|
*
|
|
1054
1054
|
* https://eslint.org/docs/latest/rules/no-unreachable-loop
|
|
1055
1055
|
*/
|
|
1056
|
-
"no-unreachable-loop": "
|
|
1056
|
+
"no-unreachable-loop": "warn",
|
|
1057
1057
|
/*
|
|
1058
1058
|
* Disallow control flow statements in finally blocks
|
|
1059
1059
|
*
|
|
1060
1060
|
* https://eslint.org/docs/latest/rules/no-unsafe-finally
|
|
1061
1061
|
*/
|
|
1062
|
-
"no-unsafe-finally": "
|
|
1062
|
+
"no-unsafe-finally": "warn",
|
|
1063
1063
|
/*
|
|
1064
1064
|
* Disallow negating the left operand of relational operators
|
|
1065
1065
|
*
|
|
1066
1066
|
* https://eslint.org/docs/latest/rules/no-unsafe-negation
|
|
1067
1067
|
*/
|
|
1068
|
-
"no-unsafe-negation": "
|
|
1068
|
+
"no-unsafe-negation": "warn",
|
|
1069
1069
|
/*
|
|
1070
1070
|
* Disallow use of optional chaining in contexts where the undefined value is not allowed
|
|
1071
1071
|
*
|
|
1072
1072
|
* https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining
|
|
1073
1073
|
*/
|
|
1074
|
-
"no-unsafe-optional-chaining": "
|
|
1074
|
+
"no-unsafe-optional-chaining": "warn",
|
|
1075
1075
|
/*
|
|
1076
1076
|
* Disallow unused expressions
|
|
1077
1077
|
*
|
|
1078
1078
|
* https://eslint.org/docs/latest/rules/no-unused-expressions
|
|
1079
1079
|
*/
|
|
1080
|
-
"no-unused-expressions": "
|
|
1080
|
+
"no-unused-expressions": "warn",
|
|
1081
1081
|
/*
|
|
1082
1082
|
* Disallow unused labels
|
|
1083
1083
|
*
|
|
1084
1084
|
* https://eslint.org/docs/latest/rules/no-unused-labels
|
|
1085
1085
|
*/
|
|
1086
|
-
"no-unused-labels": "
|
|
1086
|
+
"no-unused-labels": "warn",
|
|
1087
1087
|
/*
|
|
1088
1088
|
* Disallow Unused Private Class Members
|
|
1089
1089
|
*
|
|
1090
1090
|
* https://eslint.org/docs/latest/rules/no-unused-private-class-members
|
|
1091
1091
|
*/
|
|
1092
|
-
"no-unused-private-class-members": "
|
|
1092
|
+
"no-unused-private-class-members": "warn",
|
|
1093
1093
|
/*
|
|
1094
1094
|
* Disallow unused variables
|
|
1095
1095
|
*
|
|
1096
1096
|
* https://eslint.org/docs/latest/rules/no-unused-vars
|
|
1097
1097
|
*/
|
|
1098
1098
|
"no-unused-vars": [
|
|
1099
|
-
"
|
|
1099
|
+
"warn",
|
|
1100
1100
|
{
|
|
1101
1101
|
varsIgnorePattern: "h",
|
|
1102
1102
|
},
|
|
@@ -1107,7 +1107,7 @@ export const rules = [
|
|
|
1107
1107
|
* https://eslint.org/docs/latest/rules/no-use-before-define
|
|
1108
1108
|
*/
|
|
1109
1109
|
"no-use-before-define": [
|
|
1110
|
-
"
|
|
1110
|
+
"warn",
|
|
1111
1111
|
{
|
|
1112
1112
|
classes: true,
|
|
1113
1113
|
functions: false,
|
|
@@ -1127,69 +1127,69 @@ export const rules = [
|
|
|
1127
1127
|
*
|
|
1128
1128
|
* https://eslint.org/docs/latest/rules/no-useless-backreference
|
|
1129
1129
|
*/
|
|
1130
|
-
"no-useless-backreference": "
|
|
1130
|
+
"no-useless-backreference": "warn",
|
|
1131
1131
|
/*
|
|
1132
1132
|
* Disallow unnecessary calls to .call() and .apply()
|
|
1133
1133
|
*
|
|
1134
1134
|
* https://eslint.org/docs/latest/rules/no-useless-call
|
|
1135
1135
|
*/
|
|
1136
|
-
"no-useless-call": "
|
|
1136
|
+
"no-useless-call": "warn",
|
|
1137
1137
|
/*
|
|
1138
1138
|
* Disallow unnecessary catch clauses
|
|
1139
1139
|
*
|
|
1140
1140
|
* https://eslint.org/docs/latest/rules/no-useless-catch
|
|
1141
1141
|
*/
|
|
1142
|
-
"no-useless-catch": "
|
|
1142
|
+
"no-useless-catch": "warn",
|
|
1143
1143
|
/*
|
|
1144
1144
|
* Disallow unnecessary computed property keys in object literals
|
|
1145
1145
|
*
|
|
1146
1146
|
* https://eslint.org/docs/latest/rules/no-useless-computed-key
|
|
1147
1147
|
*/
|
|
1148
|
-
"no-useless-computed-key": "
|
|
1148
|
+
"no-useless-computed-key": "warn",
|
|
1149
1149
|
/*
|
|
1150
1150
|
* Disallow unnecessary concatenation of literals or template literals
|
|
1151
1151
|
*
|
|
1152
1152
|
* https://eslint.org/docs/latest/rules/no-useless-concat
|
|
1153
1153
|
*/
|
|
1154
|
-
"no-useless-concat": "
|
|
1154
|
+
"no-useless-concat": "warn",
|
|
1155
1155
|
/*
|
|
1156
1156
|
* Disallow unnecessary constructors
|
|
1157
1157
|
*
|
|
1158
1158
|
* https://eslint.org/docs/latest/rules/no-useless-constructor
|
|
1159
1159
|
*/
|
|
1160
|
-
"no-useless-constructor": "
|
|
1160
|
+
"no-useless-constructor": "warn",
|
|
1161
1161
|
/*
|
|
1162
1162
|
* Disallow unnecessary escape characters
|
|
1163
1163
|
*
|
|
1164
1164
|
* https://eslint.org/docs/latest/rules/no-useless-escape
|
|
1165
1165
|
*/
|
|
1166
|
-
"no-useless-escape": "
|
|
1166
|
+
"no-useless-escape": "warn",
|
|
1167
1167
|
/*
|
|
1168
1168
|
* Disallow renaming import, export, and destructured assignments to the
|
|
1169
1169
|
* same name
|
|
1170
1170
|
*
|
|
1171
1171
|
* https://eslint.org/docs/latest/rules/no-useless-rename
|
|
1172
1172
|
*/
|
|
1173
|
-
"no-useless-rename": "
|
|
1173
|
+
"no-useless-rename": "warn",
|
|
1174
1174
|
/*
|
|
1175
1175
|
* Disallow redundant return statements
|
|
1176
1176
|
*
|
|
1177
1177
|
* https://eslint.org/docs/latest/rules/no-useless-return
|
|
1178
1178
|
*/
|
|
1179
|
-
"no-useless-return": "
|
|
1179
|
+
"no-useless-return": "warn",
|
|
1180
1180
|
/*
|
|
1181
1181
|
* Require let or const instead of var
|
|
1182
1182
|
*
|
|
1183
1183
|
* https://eslint.org/docs/latest/rules/no-var
|
|
1184
1184
|
*/
|
|
1185
|
-
"no-var": "
|
|
1185
|
+
"no-var": "warn",
|
|
1186
1186
|
/*
|
|
1187
1187
|
* Disallow void operators
|
|
1188
1188
|
*
|
|
1189
1189
|
* https://eslint.org/docs/latest/rules/no-void
|
|
1190
1190
|
*/
|
|
1191
1191
|
"no-void": [
|
|
1192
|
-
"
|
|
1192
|
+
"warn",
|
|
1193
1193
|
{
|
|
1194
1194
|
allowAsStatement: true,
|
|
1195
1195
|
},
|
|
@@ -1208,20 +1208,20 @@ export const rules = [
|
|
|
1208
1208
|
*
|
|
1209
1209
|
* https://eslint.org/docs/latest/rules/no-with
|
|
1210
1210
|
*/
|
|
1211
|
-
"no-with": "
|
|
1211
|
+
"no-with": "warn",
|
|
1212
1212
|
/*
|
|
1213
1213
|
* Require or disallow method and property shorthand syntax for object literals
|
|
1214
1214
|
*
|
|
1215
1215
|
* https://eslint.org/docs/latest/rules/object-shorthand
|
|
1216
1216
|
*/
|
|
1217
|
-
"object-shorthand": "
|
|
1217
|
+
"object-shorthand": "warn",
|
|
1218
1218
|
/*
|
|
1219
1219
|
* Enforce variables to be declared either together or separately in functions
|
|
1220
1220
|
*
|
|
1221
1221
|
* https://eslint.org/docs/latest/rules/one-var
|
|
1222
1222
|
*/
|
|
1223
1223
|
"one-var": [
|
|
1224
|
-
"
|
|
1224
|
+
"warn",
|
|
1225
1225
|
"never",
|
|
1226
1226
|
],
|
|
1227
1227
|
/*
|
|
@@ -1229,27 +1229,27 @@ export const rules = [
|
|
|
1229
1229
|
*
|
|
1230
1230
|
* https://eslint.org/docs/latest/rules/operator-assignment
|
|
1231
1231
|
*/
|
|
1232
|
-
"operator-assignment": "
|
|
1232
|
+
"operator-assignment": "warn",
|
|
1233
1233
|
/*
|
|
1234
1234
|
* Require using arrow functions for callbacks
|
|
1235
1235
|
*
|
|
1236
1236
|
* https://eslint.org/docs/latest/rules/prefer-arrow-callback
|
|
1237
1237
|
*/
|
|
1238
|
-
"prefer-arrow-callback": "
|
|
1238
|
+
"prefer-arrow-callback": "warn",
|
|
1239
1239
|
/*
|
|
1240
1240
|
* Require const declarations for variables that are never reassigned
|
|
1241
1241
|
* after declared
|
|
1242
1242
|
*
|
|
1243
1243
|
* https://eslint.org/docs/latest/rules/prefer-const
|
|
1244
1244
|
*/
|
|
1245
|
-
"prefer-const": "
|
|
1245
|
+
"prefer-const": "warn",
|
|
1246
1246
|
/*
|
|
1247
1247
|
* Require destructuring from arrays and/or objects
|
|
1248
1248
|
*
|
|
1249
1249
|
* https://eslint.org/docs/latest/rules/prefer-destructuring
|
|
1250
1250
|
*/
|
|
1251
1251
|
"prefer-destructuring": [
|
|
1252
|
-
"
|
|
1252
|
+
"warn",
|
|
1253
1253
|
{
|
|
1254
1254
|
array: true,
|
|
1255
1255
|
object: false,
|
|
@@ -1260,7 +1260,7 @@ export const rules = [
|
|
|
1260
1260
|
*
|
|
1261
1261
|
* https://eslint.org/docs/latest/rules/prefer-exponentiation-operator
|
|
1262
1262
|
*/
|
|
1263
|
-
"prefer-exponentiation-operator": "
|
|
1263
|
+
"prefer-exponentiation-operator": "warn",
|
|
1264
1264
|
/*
|
|
1265
1265
|
* Enforce using named capture group in regular expression
|
|
1266
1266
|
*
|
|
@@ -1277,57 +1277,57 @@ export const rules = [
|
|
|
1277
1277
|
*
|
|
1278
1278
|
* https://eslint.org/docs/latest/rules/prefer-numeric-literals
|
|
1279
1279
|
*/
|
|
1280
|
-
"prefer-numeric-literals": "
|
|
1280
|
+
"prefer-numeric-literals": "warn",
|
|
1281
1281
|
/*
|
|
1282
1282
|
* Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call()
|
|
1283
1283
|
*
|
|
1284
1284
|
* https://eslint.org/docs/latest/rules/prefer-object-has-own
|
|
1285
1285
|
*/
|
|
1286
|
-
"prefer-object-has-own": "
|
|
1286
|
+
"prefer-object-has-own": "warn",
|
|
1287
1287
|
/*
|
|
1288
1288
|
* Disallow using Object.assign with an object literal as the first
|
|
1289
1289
|
* argument and prefer the use of object spread instead.
|
|
1290
1290
|
*
|
|
1291
1291
|
* https://eslint.org/docs/latest/rules/prefer-object-spread
|
|
1292
1292
|
*/
|
|
1293
|
-
"prefer-object-spread": "
|
|
1293
|
+
"prefer-object-spread": "warn",
|
|
1294
1294
|
/*
|
|
1295
1295
|
* Require using Error objects as Promise rejection reasons
|
|
1296
1296
|
*
|
|
1297
1297
|
* https://eslint.org/docs/latest/rules/prefer-promise-reject-errors
|
|
1298
1298
|
*/
|
|
1299
|
-
"prefer-promise-reject-errors": "
|
|
1299
|
+
"prefer-promise-reject-errors": "warn",
|
|
1300
1300
|
/*
|
|
1301
1301
|
* Disallow use of the RegExp constructor in favor of regular expression literals
|
|
1302
1302
|
*
|
|
1303
1303
|
* https://eslint.org/docs/latest/rules/prefer-promise-reject-errors
|
|
1304
1304
|
*/
|
|
1305
|
-
"prefer-regex-literals": "
|
|
1305
|
+
"prefer-regex-literals": "warn",
|
|
1306
1306
|
/*
|
|
1307
1307
|
* Require rest parameters instead of arguments
|
|
1308
1308
|
*
|
|
1309
1309
|
* https://eslint.org/docs/latest/rules/prefer-rest-params
|
|
1310
1310
|
*/
|
|
1311
|
-
"prefer-rest-params": "
|
|
1311
|
+
"prefer-rest-params": "warn",
|
|
1312
1312
|
/*
|
|
1313
1313
|
* Require spread operators instead of .apply()
|
|
1314
1314
|
*
|
|
1315
1315
|
* https://eslint.org/docs/latest/rules/prefer-spread
|
|
1316
1316
|
*/
|
|
1317
|
-
"prefer-spread": "
|
|
1317
|
+
"prefer-spread": "warn",
|
|
1318
1318
|
/*
|
|
1319
1319
|
* Require template literals instead of string concatenation
|
|
1320
1320
|
*
|
|
1321
1321
|
* https://eslint.org/docs/latest/rules/prefer-template
|
|
1322
1322
|
*/
|
|
1323
|
-
"prefer-template": "
|
|
1323
|
+
"prefer-template": "warn",
|
|
1324
1324
|
/*
|
|
1325
1325
|
* Disallow losing originally caught error when re-throwing custom errors
|
|
1326
1326
|
*
|
|
1327
1327
|
* https://eslint.org/docs/latest/rules/preserve-caught-error
|
|
1328
1328
|
*/
|
|
1329
1329
|
"preserve-caught-error": [
|
|
1330
|
-
"
|
|
1330
|
+
"warn",
|
|
1331
1331
|
{
|
|
1332
1332
|
requireCatchParameter: true,
|
|
1333
1333
|
},
|
|
@@ -1337,31 +1337,31 @@ export const rules = [
|
|
|
1337
1337
|
*
|
|
1338
1338
|
* https://eslint.org/docs/latest/rules/radix
|
|
1339
1339
|
*/
|
|
1340
|
-
radix: "
|
|
1340
|
+
radix: "warn",
|
|
1341
1341
|
/*
|
|
1342
1342
|
* Disallow assignments that can lead to race conditions due to usage of await or yield
|
|
1343
1343
|
*
|
|
1344
1344
|
* https://eslint.org/docs/latest/rules/require-atomic-updates
|
|
1345
1345
|
*/
|
|
1346
|
-
"require-atomic-updates": "
|
|
1346
|
+
"require-atomic-updates": "warn",
|
|
1347
1347
|
/*
|
|
1348
1348
|
* Disallow async functions which have no await expression
|
|
1349
1349
|
*
|
|
1350
1350
|
* https://eslint.org/docs/latest/rules/equire-awa1it
|
|
1351
1351
|
*/
|
|
1352
|
-
"require-await": "
|
|
1352
|
+
"require-await": "warn",
|
|
1353
1353
|
/*
|
|
1354
1354
|
* Enforce the use of u flag on RegExp
|
|
1355
1355
|
*
|
|
1356
1356
|
* https://eslint.org/docs/latest/rules/require-unicode-regexp
|
|
1357
1357
|
*/
|
|
1358
|
-
"require-unicode-regexp": "
|
|
1358
|
+
"require-unicode-regexp": "warn",
|
|
1359
1359
|
/*
|
|
1360
1360
|
* Require generator functions to contain yield
|
|
1361
1361
|
*
|
|
1362
1362
|
* https://eslint.org/docs/latest/rules/require-yield
|
|
1363
1363
|
*/
|
|
1364
|
-
"require-yield": "
|
|
1364
|
+
"require-yield": "warn",
|
|
1365
1365
|
/*
|
|
1366
1366
|
* Enforce sorted import declarations within modules
|
|
1367
1367
|
*
|
|
@@ -1399,14 +1399,14 @@ export const rules = [
|
|
|
1399
1399
|
*
|
|
1400
1400
|
* https://eslint.org/docs/latest/rules/sort-vars
|
|
1401
1401
|
*/
|
|
1402
|
-
"sort-vars": "
|
|
1402
|
+
"sort-vars": "warn",
|
|
1403
1403
|
/*
|
|
1404
1404
|
* Require or disallow strict mode directives
|
|
1405
1405
|
*
|
|
1406
1406
|
* https://eslint.org/docs/latest/rules/strict
|
|
1407
1407
|
*/
|
|
1408
1408
|
strict: [
|
|
1409
|
-
"
|
|
1409
|
+
"warn",
|
|
1410
1410
|
"never",
|
|
1411
1411
|
],
|
|
1412
1412
|
/*
|
|
@@ -1414,37 +1414,37 @@ export const rules = [
|
|
|
1414
1414
|
*
|
|
1415
1415
|
* https://eslint.org/docs/latest/rules/symbol-description
|
|
1416
1416
|
*/
|
|
1417
|
-
"symbol-description": "
|
|
1417
|
+
"symbol-description": "warn",
|
|
1418
1418
|
/*
|
|
1419
1419
|
* Require or disallow Unicode byte order mark (BOM)
|
|
1420
1420
|
*
|
|
1421
1421
|
* https://eslint.org/docs/latest/rules/unicode-bom
|
|
1422
1422
|
*/
|
|
1423
|
-
"unicode-bom": "
|
|
1423
|
+
"unicode-bom": "warn",
|
|
1424
1424
|
/*
|
|
1425
1425
|
* Require calls to isNaN() when checking for NaN
|
|
1426
1426
|
*
|
|
1427
1427
|
* https://eslint.org/docs/latest/rules/use-isnan
|
|
1428
1428
|
*/
|
|
1429
|
-
"use-isnan": "
|
|
1429
|
+
"use-isnan": "warn",
|
|
1430
1430
|
/*
|
|
1431
1431
|
* Enforce comparing typeof expressions against valid strings
|
|
1432
1432
|
*
|
|
1433
1433
|
* https://eslint.org/docs/latest/rules/valid-typeof
|
|
1434
1434
|
*/
|
|
1435
|
-
"valid-typeof": "
|
|
1435
|
+
"valid-typeof": "warn",
|
|
1436
1436
|
/*
|
|
1437
1437
|
* Require var declarations be placed at the top of their containing scope
|
|
1438
1438
|
*
|
|
1439
1439
|
* https://eslint.org/docs/latest/rules/vars-on-top
|
|
1440
1440
|
*/
|
|
1441
|
-
"vars-on-top": "
|
|
1441
|
+
"vars-on-top": "warn",
|
|
1442
1442
|
/*
|
|
1443
1443
|
* Require or disallow "Yoda" conditions
|
|
1444
1444
|
*
|
|
1445
1445
|
* https://eslint.org/docs/latest/rules/yoda
|
|
1446
1446
|
*/
|
|
1447
|
-
yoda: "
|
|
1447
|
+
yoda: "warn",
|
|
1448
1448
|
},
|
|
1449
1449
|
},
|
|
1450
1450
|
];
|