@jpp-toolkit/eslint-config 0.0.11
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/LICENSE.md +21 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.mjs +654 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +73 -0
- package/src/configs/eslint-config.ts +1305 -0
- package/src/configs/ignore-config.ts +17 -0
- package/src/configs/import-x-config.ts +344 -0
- package/src/configs/jsx-a11y-config.ts +278 -0
- package/src/configs/perfectionist-config.ts +180 -0
- package/src/configs/prettier-config.ts +11 -0
- package/src/configs/react-config.ts +706 -0
- package/src/configs/react-hooks-config.ts +11 -0
- package/src/configs/stylistic-config.ts +746 -0
- package/src/configs/typescript-config.ts +1211 -0
- package/src/configs/unicorn-config.ts +1212 -0
- package/src/configs/vitest-config.ts +536 -0
- package/src/index.ts +73 -0
|
@@ -0,0 +1,1305 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import { defineConfig } from 'eslint/config';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ESLint configuration.
|
|
6
|
+
* @see {@link https://eslint.org/docs/latest/rules/}
|
|
7
|
+
*/
|
|
8
|
+
export const eslintConfig = defineConfig({
|
|
9
|
+
name: 'eslint-config',
|
|
10
|
+
extends: [eslint.configs.recommended],
|
|
11
|
+
rules: {
|
|
12
|
+
/**
|
|
13
|
+
* Enforce return statements in callbacks of array methods.
|
|
14
|
+
* @see {@link https://eslint.org/docs/latest/rules/array-callback-return}
|
|
15
|
+
*/
|
|
16
|
+
'array-callback-return': ['error', { checkForEach: true, allowVoid: true }],
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Disallow await inside of loops.
|
|
20
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-await-in-loop}
|
|
21
|
+
*/
|
|
22
|
+
// 'no-await-in-loop': 'error',
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Disallow returning value from constructor.
|
|
26
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-constructor-return}
|
|
27
|
+
*/
|
|
28
|
+
'no-constructor-return': 'error',
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Disallow duplicate module imports.
|
|
32
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-duplicate-imports}
|
|
33
|
+
*/
|
|
34
|
+
'no-duplicate-imports': 'error',
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Disallow variable or function declarations in nested blocks.
|
|
38
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-inner-declarations}
|
|
39
|
+
*/
|
|
40
|
+
'no-inner-declarations': 'error',
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Disallow returning values from Promise executor functions.
|
|
44
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-promise-executor-return}
|
|
45
|
+
*/
|
|
46
|
+
'no-promise-executor-return': ['error', { allowVoid: true }],
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Disallow comparisons where both sides are exactly the same.
|
|
50
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-self-compare}
|
|
51
|
+
*/
|
|
52
|
+
'no-self-compare': 'error',
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Disallow template literal placeholder syntax in regular strings.
|
|
56
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-template-curly-in-string}
|
|
57
|
+
*/
|
|
58
|
+
'no-template-curly-in-string': 'error',
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Disallow let or var variables that are read but never assigned.
|
|
62
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unassigned-vars}
|
|
63
|
+
*/
|
|
64
|
+
'no-unassigned-vars': 'error',
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Disallow unmodified loop conditions.
|
|
68
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unmodified-loop-condition}
|
|
69
|
+
*/
|
|
70
|
+
'no-unmodified-loop-condition': 'error',
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Disallow loops with a body that allows only one iteration.
|
|
74
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unreachable-loop}
|
|
75
|
+
*/
|
|
76
|
+
'no-unreachable-loop': 'error',
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Disallow the use of variables before they are defined.
|
|
80
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-use-before-define}
|
|
81
|
+
*/
|
|
82
|
+
'no-use-before-define': 'error',
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Disallow variable assignments when the value is not used.
|
|
86
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-assignment}
|
|
87
|
+
*/
|
|
88
|
+
'no-useless-assignment': 'error',
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Disallow assignments that can lead to race conditions due to usage of await or yield.
|
|
92
|
+
* @see {@link https://eslint.org/docs/latest/rules/require-atomic-updates}
|
|
93
|
+
*/
|
|
94
|
+
'require-atomic-updates': 'error',
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Enforce getter and setter pairs in objects and classes.
|
|
98
|
+
* @see {@link https://eslint.org/docs/latest/rules/accessor-pairs}
|
|
99
|
+
*/
|
|
100
|
+
// 'accessor-pairs': 'error',
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Require braces around arrow function bodies.
|
|
104
|
+
* @fixable
|
|
105
|
+
* @see {@link https://eslint.org/docs/latest/rules/arrow-body-style}
|
|
106
|
+
*/
|
|
107
|
+
'arrow-body-style': 'error',
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Enforce the use of variables within the scope they are defined.
|
|
111
|
+
* @see {@link https://eslint.org/docs/latest/rules/block-scoped-var}
|
|
112
|
+
*/
|
|
113
|
+
'block-scoped-var': 'error',
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Enforce camelcase naming convention.
|
|
117
|
+
* @see {@link https://eslint.org/docs/latest/rules/camelcase}
|
|
118
|
+
*/
|
|
119
|
+
'camelcase': 'error',
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Enforce or disallow capitalization of the first letter of a comment.
|
|
123
|
+
* @fixable
|
|
124
|
+
* @see {@link https://eslint.org/docs/latest/rules/capitalized-comments}
|
|
125
|
+
*/
|
|
126
|
+
// 'capitalized-comments': 'error',
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Enforce that class methods utilize this.
|
|
130
|
+
* @see {@link https://eslint.org/docs/latest/rules/class-methods-use-this}
|
|
131
|
+
*/
|
|
132
|
+
// 'class-methods-use-this': 'error',
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Enforce a maximum cyclomatic complexity allowed in a program.
|
|
136
|
+
* @see {@link https://eslint.org/docs/latest/rules/complexity}
|
|
137
|
+
*/
|
|
138
|
+
// 'complexity': 'error',
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Require return statements to either always or never specify values.
|
|
142
|
+
* @see {@link https://eslint.org/docs/latest/rules/consistent-return}
|
|
143
|
+
*/
|
|
144
|
+
'consistent-return': 'error',
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Enforce consistent naming when capturing the current execution context.
|
|
148
|
+
* @see {@link https://eslint.org/docs/latest/rules/consistent-this}
|
|
149
|
+
*/
|
|
150
|
+
'consistent-this': ['error', 'self'],
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Enforce consistent brace style for all control statements.
|
|
154
|
+
* @fixable
|
|
155
|
+
* @see {@link https://eslint.org/docs/latest/rules/curly}
|
|
156
|
+
*/
|
|
157
|
+
'curly': ['error', 'multi-or-nest', 'consistent'],
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Require default cases in switch statements.
|
|
161
|
+
* @see {@link https://eslint.org/docs/latest/rules/default-case}
|
|
162
|
+
*/
|
|
163
|
+
'default-case': 'error',
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Enforce default clauses in switch statements to be last.
|
|
167
|
+
* @see {@link https://eslint.org/docs/latest/rules/default-case-last}
|
|
168
|
+
*/
|
|
169
|
+
'default-case-last': 'error',
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Enforce default parameters to be last.
|
|
173
|
+
* @see {@link https://eslint.org/docs/latest/rules/default-param-last}
|
|
174
|
+
*/
|
|
175
|
+
'default-param-last': 'error',
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Enforce dot notation whenever possible.
|
|
179
|
+
* @fixable
|
|
180
|
+
* @see {@link https://eslint.org/docs/latest/rules/dot-notation}
|
|
181
|
+
*/
|
|
182
|
+
'dot-notation': 'error',
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Require the use of === and !==.
|
|
186
|
+
* @fixable
|
|
187
|
+
* @see {@link https://eslint.org/docs/latest/rules/eqeqeq}
|
|
188
|
+
*/
|
|
189
|
+
'eqeqeq': 'error',
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Require function names to match the name of the variable or property to which they are assigned.
|
|
193
|
+
* @see {@link https://eslint.org/docs/latest/rules/func-name-matching}
|
|
194
|
+
*/
|
|
195
|
+
// 'func-name-matching': 'error',
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Require or disallow named function expressions.
|
|
199
|
+
* @see {@link https://eslint.org/docs/latest/rules/func-names}
|
|
200
|
+
*/
|
|
201
|
+
// 'func-names': 'error',
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Enforce the consistent use of either function declarations or expressions assigned to variables.
|
|
205
|
+
* @see {@link https://eslint.org/docs/latest/rules/func-style}
|
|
206
|
+
*/
|
|
207
|
+
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Require grouped accessor pairs in object literals and classes.
|
|
211
|
+
* @see {@link https://eslint.org/docs/latest/rules/grouped-accessor-pairs}
|
|
212
|
+
*/
|
|
213
|
+
'grouped-accessor-pairs': ['error', 'getBeforeSet'],
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Require for-in loops to include an if statement.
|
|
217
|
+
* @see {@link https://eslint.org/docs/latest/rules/guard-for-in}
|
|
218
|
+
*/
|
|
219
|
+
'guard-for-in': 'error',
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Disallow specified identifiers.
|
|
223
|
+
* @see {@link https://eslint.org/docs/latest/rules/id-denylist}
|
|
224
|
+
*/
|
|
225
|
+
// 'id-denylist': 'error',
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Enforce minimum and maximum identifier lengths.
|
|
229
|
+
* @see {@link https://eslint.org/docs/latest/rules/id-length}
|
|
230
|
+
*/
|
|
231
|
+
// 'id-length': 'error',
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Require identifiers to match a specified regular expression.
|
|
235
|
+
* @see {@link https://eslint.org/docs/latest/rules/id-match}
|
|
236
|
+
*/
|
|
237
|
+
// 'id-match': 'error',
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Require or disallow initialization in variable declarations.
|
|
241
|
+
* @see {@link https://eslint.org/docs/latest/rules/init-declarations}
|
|
242
|
+
*/
|
|
243
|
+
// 'init-declarations': 'error',
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Require or disallow logical assignment operator shorthand.
|
|
247
|
+
* @fixable
|
|
248
|
+
* @see {@link https://eslint.org/docs/latest/rules/logical-assignment-operators}
|
|
249
|
+
*/
|
|
250
|
+
'logical-assignment-operators': 'error',
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Enforce a maximum number of classes per file.
|
|
254
|
+
* @see {@link https://eslint.org/docs/latest/rules/max-classes-per-file}
|
|
255
|
+
*/
|
|
256
|
+
// 'max-classes-per-file': 'error',
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Enforce a maximum depth that blocks can be nested.
|
|
260
|
+
* @see {@link https://eslint.org/docs/latest/rules/max-depth}
|
|
261
|
+
*/
|
|
262
|
+
// 'max-depth': 'error',
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Enforce a maximum number of lines per file.
|
|
266
|
+
* @see {@link https://eslint.org/docs/latest/rules/max-lines}
|
|
267
|
+
*/
|
|
268
|
+
// 'max-lines': 'error',
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Enforce a maximum number of lines of code in a function.
|
|
272
|
+
* @see {@link https://eslint.org/docs/latest/rules/max-lines-per-function}
|
|
273
|
+
*/
|
|
274
|
+
// 'max-lines-per-function': 'error',
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Enforce a maximum depth that callbacks can be nested.
|
|
278
|
+
* @see {@link https://eslint.org/docs/latest/rules/max-nested-callbacks}
|
|
279
|
+
*/
|
|
280
|
+
// 'max-nested-callbacks': 'error',
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Enforce a maximum number of parameters in function definitions.
|
|
284
|
+
* @see {@link https://eslint.org/docs/latest/rules/max-params}
|
|
285
|
+
*/
|
|
286
|
+
// 'max-params': 'error',
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Enforce a maximum number of statements allowed in function blocks.
|
|
290
|
+
* @see {@link https://eslint.org/docs/latest/rules/max-statements}
|
|
291
|
+
*/
|
|
292
|
+
// 'max-statements': 'error',
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Require constructor names to begin with a capital letter.
|
|
296
|
+
* @see {@link https://eslint.org/docs/latest/rules/new-cap}
|
|
297
|
+
*/
|
|
298
|
+
// 'new-cap': 'error',
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Disallow the use of alert, confirm, and prompt.
|
|
302
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-alert}
|
|
303
|
+
*/
|
|
304
|
+
// 'no-alert': 'error',
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Disallow Array constructors.
|
|
308
|
+
* @fixable
|
|
309
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-array-constructor}
|
|
310
|
+
*/
|
|
311
|
+
'no-array-constructor': 'error',
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Disallow bitwise operators.
|
|
315
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-bitwise}
|
|
316
|
+
*/
|
|
317
|
+
// 'no-bitwise': 'error',
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Disallow the use of arguments.caller or arguments.callee.
|
|
321
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-caller}
|
|
322
|
+
*/
|
|
323
|
+
'no-caller': 'error',
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Disallow the use of console.
|
|
327
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-console}
|
|
328
|
+
*/
|
|
329
|
+
// 'no-console': 'error',
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Disallow continue statements.
|
|
333
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-continue}
|
|
334
|
+
*/
|
|
335
|
+
// 'no-continue': 'error',
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Disallow equal signs explicitly at the beginning of regular expressions.
|
|
339
|
+
* @fixable
|
|
340
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-div-regex}
|
|
341
|
+
*/
|
|
342
|
+
'no-div-regex': 'error',
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Disallow else blocks after return statements in if statements.
|
|
346
|
+
* @fixable
|
|
347
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-else-return}
|
|
348
|
+
*/
|
|
349
|
+
// 'no-else-return': 'error',
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Disallow empty functions.
|
|
353
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-empty-function}
|
|
354
|
+
*/
|
|
355
|
+
'no-empty-function': 'error',
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Disallow null comparisons without type-checking operators.
|
|
359
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-eq-null}
|
|
360
|
+
*/
|
|
361
|
+
'no-eq-null': 'error',
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Disallow the use of eval().
|
|
365
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-eval}
|
|
366
|
+
*/
|
|
367
|
+
'no-eval': 'error',
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Disallow extending native types.
|
|
371
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-extend-native}
|
|
372
|
+
*/
|
|
373
|
+
'no-extend-native': 'error',
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Disallow unnecessary calls to .bind().
|
|
377
|
+
* @fixable
|
|
378
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-extra-bind}
|
|
379
|
+
*/
|
|
380
|
+
'no-extra-bind': 'error',
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Disallow unnecessary labels.
|
|
384
|
+
* @fixable
|
|
385
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-extra-label}
|
|
386
|
+
*/
|
|
387
|
+
'no-extra-label': 'error',
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Disallow shorthand type conversions.
|
|
391
|
+
* @fixable
|
|
392
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-implicit-coercion}
|
|
393
|
+
*/
|
|
394
|
+
'no-implicit-coercion': 'error',
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Disallow declarations in the global scope.
|
|
398
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-implicit-globals}
|
|
399
|
+
*/
|
|
400
|
+
'no-implicit-globals': 'error',
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Disallow the use of eval()-like methods.
|
|
404
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-implied-eval}
|
|
405
|
+
*/
|
|
406
|
+
'no-implied-eval': 'error',
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Disallow inline comments after code.
|
|
410
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-inline-comments}
|
|
411
|
+
*/
|
|
412
|
+
'no-inline-comments': 'error',
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Disallow use of this in contexts where the value of this is undefined.
|
|
416
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-invalid-this}
|
|
417
|
+
*/
|
|
418
|
+
'no-invalid-this': 'error',
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Disallow the use of the __iterator__ property.
|
|
422
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-iterator}
|
|
423
|
+
*/
|
|
424
|
+
'no-iterator': 'error',
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Disallow labels that share a name with a variable.
|
|
428
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-label-var}
|
|
429
|
+
*/
|
|
430
|
+
'no-label-var': 'error',
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Disallow labeled statements.
|
|
434
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-labels}
|
|
435
|
+
*/
|
|
436
|
+
'no-labels': 'error',
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Disallow unnecessary nested blocks.
|
|
440
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-lone-blocks}
|
|
441
|
+
*/
|
|
442
|
+
'no-lone-blocks': 'error',
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Disallow if statements as the only statement in else blocks.
|
|
446
|
+
* @fixable
|
|
447
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-lonely-if}
|
|
448
|
+
*/
|
|
449
|
+
'no-lonely-if': 'error',
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Disallow function declarations that contain unsafe references inside loop statements.
|
|
453
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-loop-func}
|
|
454
|
+
*/
|
|
455
|
+
'no-loop-func': 'error',
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Disallow magic numbers.
|
|
459
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-magic-numbers}
|
|
460
|
+
*/
|
|
461
|
+
// 'no-magic-numbers': 'error',
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Disallow use of chained assignment expressions.
|
|
465
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-multi-assign}
|
|
466
|
+
*/
|
|
467
|
+
'no-multi-assign': 'error',
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Disallow multiline strings.
|
|
471
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-multi-str}
|
|
472
|
+
*/
|
|
473
|
+
// 'no-multi-str': 'error',
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Disallow negated conditions.
|
|
477
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-negated-condition}
|
|
478
|
+
*/
|
|
479
|
+
// 'no-negated-condition': 'error',
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Disallow nested ternary expressions.
|
|
483
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-nested-ternary}
|
|
484
|
+
*/
|
|
485
|
+
// 'no-nested-ternary': 'error',
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Disallow new operators outside of assignments or comparisons.
|
|
489
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-new}
|
|
490
|
+
*/
|
|
491
|
+
'no-new': 'error',
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Disallow new operators with the Function object.
|
|
495
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-new-func}
|
|
496
|
+
*/
|
|
497
|
+
'no-new-func': 'error',
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Disallow new operators with the String, Number, and Boolean objects.
|
|
501
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-new-wrappers}
|
|
502
|
+
*/
|
|
503
|
+
'no-new-wrappers': 'error',
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Disallow calls to the Object constructor without an argument.
|
|
507
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-object-constructor}
|
|
508
|
+
*/
|
|
509
|
+
'no-object-constructor': 'error',
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Disallow octal escape sequences in string literals.
|
|
513
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-octal-escape}
|
|
514
|
+
*/
|
|
515
|
+
'no-octal-escape': 'error',
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Disallow reassigning function parameters.
|
|
519
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-param-reassign}
|
|
520
|
+
*/
|
|
521
|
+
'no-param-reassign': 'error',
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Disallow the unary operators ++ and --.
|
|
525
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-plusplus}
|
|
526
|
+
*/
|
|
527
|
+
'no-plusplus': 'error',
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Disallow the use of the __proto__ property.
|
|
531
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-proto}
|
|
532
|
+
*/
|
|
533
|
+
'no-proto': 'error',
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Disallow specified names in exports.
|
|
537
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-restricted-exports}
|
|
538
|
+
*/
|
|
539
|
+
// 'no-restricted-exports': 'error',
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Disallow specified global variables.
|
|
543
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-restricted-globals}
|
|
544
|
+
*/
|
|
545
|
+
// 'no-restricted-globals': 'error',
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Disallow specified modules when loaded by import.
|
|
549
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-restricted-imports}
|
|
550
|
+
*/
|
|
551
|
+
// 'no-restricted-imports': 'error',
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Disallow certain properties on certain objects.
|
|
555
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-restricted-properties}
|
|
556
|
+
*/
|
|
557
|
+
// 'no-restricted-properties': 'error',
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Disallow specified syntax.
|
|
561
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-restricted-syntax}
|
|
562
|
+
*/
|
|
563
|
+
// 'no-restricted-syntax': 'error',
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Disallow assignment operators in return statements.
|
|
567
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-return-assign}
|
|
568
|
+
*/
|
|
569
|
+
'no-return-assign': 'error',
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Disallow javascript: URLs.
|
|
573
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-script-url}
|
|
574
|
+
*/
|
|
575
|
+
'no-script-url': 'error',
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Disallow comma operators.
|
|
579
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-sequences}
|
|
580
|
+
*/
|
|
581
|
+
'no-sequences': 'error',
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Disallow variable declarations from shadowing variables declared in the outer scope.
|
|
585
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-shadow}
|
|
586
|
+
*/
|
|
587
|
+
'no-shadow': 'error',
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Disallow ternary operators.
|
|
591
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-ternary}
|
|
592
|
+
*/
|
|
593
|
+
// 'no-ternary': 'error',
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Disallow throwing literals as exceptions.
|
|
597
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-throw-literal}
|
|
598
|
+
*/
|
|
599
|
+
'no-throw-literal': 'error',
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Disallow initializing variables to undefined.
|
|
603
|
+
* @fixable
|
|
604
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-undef-init}
|
|
605
|
+
*/
|
|
606
|
+
'no-undef-init': 'error',
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Disallow the use of undefined as an identifier.
|
|
610
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-undefined}
|
|
611
|
+
*/
|
|
612
|
+
// 'no-undefined': 'error',
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Disallow dangling underscores in identifiers.
|
|
616
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-underscore-dangle}
|
|
617
|
+
*/
|
|
618
|
+
// 'no-underscore-dangle': 'error',
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Disallow ternary operators when simpler alternatives exist.
|
|
622
|
+
* @fixable
|
|
623
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unneeded-ternary}
|
|
624
|
+
*/
|
|
625
|
+
'no-unneeded-ternary': 'error',
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Disallow unused expressions.
|
|
629
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unused-expressions}
|
|
630
|
+
*/
|
|
631
|
+
'no-unused-expressions': 'error',
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Disallow unnecessary calls to .call() and .apply().
|
|
635
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-call}
|
|
636
|
+
*/
|
|
637
|
+
'no-useless-call': 'error',
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Disallow unnecessary computed property keys in objects and classes.
|
|
641
|
+
* @fixable
|
|
642
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-computed-key}
|
|
643
|
+
*/
|
|
644
|
+
'no-useless-computed-key': 'error',
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Disallow unnecessary concatenation of literals or template literals.
|
|
648
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-concat}
|
|
649
|
+
*/
|
|
650
|
+
'no-useless-concat': 'error',
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Disallow unnecessary constructors.
|
|
654
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-constructor}
|
|
655
|
+
*/
|
|
656
|
+
'no-useless-constructor': 'error',
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Disallow renaming import, export, and destructured assignments to the same name.
|
|
660
|
+
* @fixable
|
|
661
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-rename}
|
|
662
|
+
*/
|
|
663
|
+
'no-useless-rename': 'error',
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Disallow redundant return statements.
|
|
667
|
+
* @fixable
|
|
668
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-return}
|
|
669
|
+
*/
|
|
670
|
+
'no-useless-return': 'error',
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Require let or const instead of var.
|
|
674
|
+
* @fixable
|
|
675
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-var}
|
|
676
|
+
*/
|
|
677
|
+
'no-var': 'error',
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Disallow void operators.
|
|
681
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-void}
|
|
682
|
+
*/
|
|
683
|
+
// 'no-void': 'error',
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Disallow specified warning terms in comments.
|
|
687
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-warning-comments}
|
|
688
|
+
*/
|
|
689
|
+
// 'no-warning-comments': 'error',
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Require or disallow method and property shorthand syntax for object literals.
|
|
693
|
+
* @fixable
|
|
694
|
+
* @see {@link https://eslint.org/docs/latest/rules/object-shorthand}
|
|
695
|
+
*/
|
|
696
|
+
'object-shorthand': 'error',
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Enforce variables to be declared either together or separately in functions.
|
|
700
|
+
* @fixable
|
|
701
|
+
* @see {@link https://eslint.org/docs/latest/rules/one-var}
|
|
702
|
+
*/
|
|
703
|
+
// 'one-var': 'error',
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Require or disallow assignment operator shorthand where possible.
|
|
707
|
+
* @fixable
|
|
708
|
+
* @see {@link https://eslint.org/docs/latest/rules/operator-assignment}
|
|
709
|
+
*/
|
|
710
|
+
'operator-assignment': 'error',
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Require using arrow functions for callbacks.
|
|
714
|
+
* @fixable
|
|
715
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-arrow-callback}
|
|
716
|
+
*/
|
|
717
|
+
'prefer-arrow-callback': 'error',
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Require const declarations for variables that are never reassigned after declared.
|
|
721
|
+
* @fixable
|
|
722
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-const}
|
|
723
|
+
*/
|
|
724
|
+
'prefer-const': 'error',
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Require destructuring from arrays and/or objects.
|
|
728
|
+
* @fixable
|
|
729
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-destructuring}
|
|
730
|
+
*/
|
|
731
|
+
'prefer-destructuring': 'error',
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Disallow the use of Math.pow in favor of the ** operator.
|
|
735
|
+
* @fixable
|
|
736
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-exponentiation-operator}
|
|
737
|
+
*/
|
|
738
|
+
'prefer-exponentiation-operator': 'error',
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Enforce using named capture group in regular expression.
|
|
742
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-named-capture-group}
|
|
743
|
+
*/
|
|
744
|
+
'prefer-named-capture-group': 'error',
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals.
|
|
748
|
+
* @fixable
|
|
749
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-numeric-literals}
|
|
750
|
+
*/
|
|
751
|
+
'prefer-numeric-literals': 'error',
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Disallow use of Object.prototype.hasOwnProperty.call() and prefer use of Object.hasOwn().
|
|
755
|
+
* @fixable
|
|
756
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-object-has-own}
|
|
757
|
+
*/
|
|
758
|
+
'prefer-object-has-own': 'error',
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead.
|
|
762
|
+
* @fixable
|
|
763
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-object-spread}
|
|
764
|
+
*/
|
|
765
|
+
'prefer-object-spread': 'error',
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Require using Error objects as Promise rejection reasons.
|
|
769
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-promise-reject-errors}
|
|
770
|
+
*/
|
|
771
|
+
'prefer-promise-reject-errors': 'error',
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Disallow use of the RegExp constructor in favor of regular expression literals.
|
|
775
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-regex-literals}
|
|
776
|
+
*/
|
|
777
|
+
'prefer-regex-literals': 'error',
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Require rest parameters instead of arguments.
|
|
781
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-rest-params}
|
|
782
|
+
*/
|
|
783
|
+
'prefer-rest-params': 'error',
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Require spread operators instead of .apply().
|
|
787
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-spread}
|
|
788
|
+
*/
|
|
789
|
+
'prefer-spread': 'error',
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Require template literals instead of string concatenation.
|
|
793
|
+
* @fixable
|
|
794
|
+
* @see {@link https://eslint.org/docs/latest/rules/prefer-template}
|
|
795
|
+
*/
|
|
796
|
+
'prefer-template': 'error',
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Disallow losing originally caught error when re-throwing custom errors.
|
|
800
|
+
* @see {@link https://eslint.org/docs/latest/rules/preserve-caught-error}
|
|
801
|
+
*/
|
|
802
|
+
// 'preserve-caught-error': 'error',
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Enforce the consistent use of the radix argument when using parseInt().
|
|
806
|
+
* @see {@link https://eslint.org/docs/latest/rules/radix}
|
|
807
|
+
*/
|
|
808
|
+
'radix': ['error', 'as-needed'],
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Disallow async functions which have no await expression.
|
|
812
|
+
* @see {@link https://eslint.org/docs/latest/rules/require-await}
|
|
813
|
+
*/
|
|
814
|
+
'require-await': 'error',
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Enforce the use of u or v flag on regular expressions.
|
|
818
|
+
* @see {@link https://eslint.org/docs/latest/rules/require-unicode-regexp}
|
|
819
|
+
*/
|
|
820
|
+
'require-unicode-regexp': 'error',
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* Enforce sorted import declarations within modules.
|
|
824
|
+
* @fixable
|
|
825
|
+
* @see {@link https://eslint.org/docs/latest/rules/sort-imports}
|
|
826
|
+
*/
|
|
827
|
+
'sort-imports': 'error',
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Require object keys to be sorted.
|
|
831
|
+
* @see {@link https://eslint.org/docs/latest/rules/sort-keys}
|
|
832
|
+
*/
|
|
833
|
+
// 'sort-keys': 'error',
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Require variables within the same declaration block to be sorted.
|
|
837
|
+
* @fixable
|
|
838
|
+
* @see {@link https://eslint.org/docs/latest/rules/sort-vars}
|
|
839
|
+
*/
|
|
840
|
+
// 'sort-vars': 'error',
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Require or disallow strict mode directives.
|
|
844
|
+
* @fixable
|
|
845
|
+
* @see {@link https://eslint.org/docs/latest/rules/strict}
|
|
846
|
+
*/
|
|
847
|
+
// 'strict': 'error',
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* Require symbol descriptions.
|
|
851
|
+
* @see {@link https://eslint.org/docs/latest/rules/symbol-description}
|
|
852
|
+
*/
|
|
853
|
+
'symbol-description': 'error',
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Require var declarations be placed at the top of their containing scope.
|
|
857
|
+
* @see {@link https://eslint.org/docs/latest/rules/vars-on-top}
|
|
858
|
+
*/
|
|
859
|
+
// 'vars-on-top': 'error',
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Require or disallow “Yoda” conditions.
|
|
863
|
+
* @fixable
|
|
864
|
+
* @see {@link https://eslint.org/docs/latest/rules/yoda}
|
|
865
|
+
*/
|
|
866
|
+
// 'yoda': 'error',
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Require or disallow Unicode byte order mark (BOM).
|
|
870
|
+
* @fixable
|
|
871
|
+
* @see {@link https://eslint.org/docs/latest/rules/unicode-bom}
|
|
872
|
+
*/
|
|
873
|
+
// 'unicode-bom': 'error',
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Require super() calls in constructors.
|
|
877
|
+
* @config recommended
|
|
878
|
+
* @see {@link https://eslint.org/docs/latest/rules/constructor-super}
|
|
879
|
+
*/
|
|
880
|
+
// 'constructor-super': 'off',
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Enforce for loop update clause moving the counter in the right direction.
|
|
884
|
+
* @config recommended
|
|
885
|
+
* @see {@link https://eslint.org/docs/latest/rules/for-direction}
|
|
886
|
+
*/
|
|
887
|
+
// 'for-direction': 'off',
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* Enforce return statements in getters.
|
|
891
|
+
* @config recommended
|
|
892
|
+
* @see {@link https://eslint.org/docs/latest/rules/getter-return}
|
|
893
|
+
*/
|
|
894
|
+
// 'getter-return': 'off',
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Disallow using an async function as a Promise executor.
|
|
898
|
+
* @config recommended
|
|
899
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-async-promise-executor}
|
|
900
|
+
*/
|
|
901
|
+
// 'no-async-promise-executor': 'off',
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Disallow reassigning class members.
|
|
905
|
+
* @config recommended
|
|
906
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-class-assign}
|
|
907
|
+
*/
|
|
908
|
+
// 'no-class-assign': 'off',
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Disallow comparing against -0.
|
|
912
|
+
* @config recommended
|
|
913
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-compare-neg-zero}
|
|
914
|
+
*/
|
|
915
|
+
// 'no-compare-neg-zero': 'off',
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Disallow assignment operators in conditional expressions.
|
|
919
|
+
* @config recommended
|
|
920
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-cond-assign}
|
|
921
|
+
*/
|
|
922
|
+
// 'no-cond-assign': 'off',
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Disallow reassigning const, using, and await using variables.
|
|
926
|
+
* @config recommended
|
|
927
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-const-assign}
|
|
928
|
+
*/
|
|
929
|
+
// 'no-const-assign': 'off',
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* Disallow expressions where the operation doesn’t affect the value.
|
|
933
|
+
* @config recommended
|
|
934
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-constant-binary-expression}
|
|
935
|
+
*/
|
|
936
|
+
// 'no-constant-binary-expression': 'off',
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* Disallow constant expressions in conditions.
|
|
940
|
+
* @config recommended
|
|
941
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-constant-condition}
|
|
942
|
+
*/
|
|
943
|
+
// 'no-constant-condition': 'off',
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Disallow control characters in regular expressions.
|
|
947
|
+
* @config recommended
|
|
948
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-control-regex}
|
|
949
|
+
*/
|
|
950
|
+
// 'no-control-regex': 'off',
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Disallow the use of debugger.
|
|
954
|
+
* @config recommended
|
|
955
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-debugger}
|
|
956
|
+
*/
|
|
957
|
+
// 'no-debugger': 'off',
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Disallow duplicate arguments in function definitions.
|
|
961
|
+
* @config recommended
|
|
962
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-dupe-args}
|
|
963
|
+
*/
|
|
964
|
+
// 'no-dupe-args': 'off',
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Disallow duplicate class members.
|
|
968
|
+
* @config recommended
|
|
969
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-dupe-class-members}
|
|
970
|
+
*/
|
|
971
|
+
// 'no-dupe-class-members': 'off',
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Disallow duplicate conditions in if-else-if chains.
|
|
975
|
+
* @config recommended
|
|
976
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-dupe-else-if}
|
|
977
|
+
*/
|
|
978
|
+
// 'no-dupe-else-if': 'off',
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Disallow duplicate keys in object literals.
|
|
982
|
+
* @config recommended
|
|
983
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-dupe-keys}
|
|
984
|
+
*/
|
|
985
|
+
// 'no-dupe-keys': 'off',
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* Disallow duplicate case labels.
|
|
989
|
+
* @config recommended
|
|
990
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-duplicate-case}
|
|
991
|
+
*/
|
|
992
|
+
// 'no-duplicate-case': 'off',
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Disallow empty character classes in regular expressions.
|
|
996
|
+
* @config recommended
|
|
997
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-empty-character-class}
|
|
998
|
+
*/
|
|
999
|
+
// 'no-empty-character-class': 'off',
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Disallow empty destructuring patterns.
|
|
1003
|
+
* @config recommended
|
|
1004
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-empty-pattern}
|
|
1005
|
+
*/
|
|
1006
|
+
// 'no-empty-pattern': 'off',
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* Disallow reassigning exceptions in catch clauses.
|
|
1010
|
+
* @config recommended
|
|
1011
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-ex-assign}
|
|
1012
|
+
*/
|
|
1013
|
+
// 'no-ex-assign': 'off',
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Disallow fallthrough of case statements.
|
|
1017
|
+
* @config recommended
|
|
1018
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-fallthrough}
|
|
1019
|
+
*/
|
|
1020
|
+
// 'no-fallthrough': 'off',
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Disallow reassigning function declarations.
|
|
1024
|
+
* @config recommended
|
|
1025
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-func-assign}
|
|
1026
|
+
*/
|
|
1027
|
+
// 'no-func-assign': 'off',
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Disallow assigning to imported bindings.
|
|
1031
|
+
* @config recommended
|
|
1032
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-import-assign}
|
|
1033
|
+
*/
|
|
1034
|
+
// 'no-import-assign': 'off',
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Disallow invalid regular expression strings in RegExp constructors.
|
|
1038
|
+
* @config recommended
|
|
1039
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-invalid-regexp}
|
|
1040
|
+
*/
|
|
1041
|
+
// 'no-invalid-regexp': 'off',
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Disallow irregular whitespace.
|
|
1045
|
+
* @config recommended
|
|
1046
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-irregular-whitespace}
|
|
1047
|
+
*/
|
|
1048
|
+
// 'no-irregular-whitespace': 'off',
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* Disallow literal numbers that lose precision.
|
|
1052
|
+
* @config recommended
|
|
1053
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-loss-of-precision}
|
|
1054
|
+
*/
|
|
1055
|
+
// 'no-loss-of-precision': 'off',
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Disallow characters which are made with multiple code points in character class syntax.
|
|
1059
|
+
* @config recommended
|
|
1060
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-misleading-character-class}
|
|
1061
|
+
*/
|
|
1062
|
+
// 'no-misleading-character-class': 'off',
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Disallow new operators with global non-constructor functions.
|
|
1066
|
+
* @config recommended
|
|
1067
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-new-native-nonconstructor}
|
|
1068
|
+
*/
|
|
1069
|
+
// 'no-new-native-nonconstructor': 'off',
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* Disallow calling global object properties as functions.
|
|
1073
|
+
* @config recommended
|
|
1074
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-obj-calls}
|
|
1075
|
+
*/
|
|
1076
|
+
// 'no-obj-calls': 'off',
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Disallow calling some Object.prototype methods directly on objects.
|
|
1080
|
+
* @config recommended
|
|
1081
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-prototype-builtins}
|
|
1082
|
+
*/
|
|
1083
|
+
// 'no-prototype-builtins': 'off',
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Disallow assignments where both sides are exactly the same.
|
|
1087
|
+
* @config recommended
|
|
1088
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-self-assign}
|
|
1089
|
+
*/
|
|
1090
|
+
// 'no-self-assign': 'off',
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* Disallow returning values from setters.
|
|
1094
|
+
* @config recommended
|
|
1095
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-setter-return}
|
|
1096
|
+
*/
|
|
1097
|
+
// 'no-setter-return': 'off',
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* Disallow sparse arrays.
|
|
1101
|
+
* @config recommended
|
|
1102
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-sparse-arrays}
|
|
1103
|
+
*/
|
|
1104
|
+
// 'no-sparse-arrays': 'off',
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Disallow this/super before calling super() in constructors.
|
|
1108
|
+
* @config recommended
|
|
1109
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-this-before-super}
|
|
1110
|
+
*/
|
|
1111
|
+
// 'no-this-before-super': 'off',
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Disallow the use of undeclared variables unless mentioned in /*global *\/ comments.
|
|
1115
|
+
* @config recommended
|
|
1116
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-undef}
|
|
1117
|
+
*/
|
|
1118
|
+
// 'no-undef': 'off',
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Disallow confusing multiline expressions.
|
|
1122
|
+
* @config recommended
|
|
1123
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unexpected-multiline}
|
|
1124
|
+
*/
|
|
1125
|
+
// 'no-unexpected-multiline': 'off',
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* Disallow unreachable code after return, throw, continue, and break statements.
|
|
1129
|
+
* @config recommended
|
|
1130
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unreachable}
|
|
1131
|
+
*/
|
|
1132
|
+
// 'no-unreachable': 'off',
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Disallow control flow statements in finally blocks.
|
|
1136
|
+
* @config recommended
|
|
1137
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unsafe-finally}
|
|
1138
|
+
*/
|
|
1139
|
+
// 'no-unsafe-finally': 'off',
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* Disallow negating the left operand of relational operators.
|
|
1143
|
+
* @config recommended
|
|
1144
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unsafe-negation}
|
|
1145
|
+
*/
|
|
1146
|
+
// 'no-unsafe-negation': 'off',
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* Disallow use of optional chaining in contexts where the undefined value is not allowed.
|
|
1150
|
+
* @config recommended
|
|
1151
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining}
|
|
1152
|
+
*/
|
|
1153
|
+
// 'no-unsafe-optional-chaining': 'off',
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* Disallow unused private class members.
|
|
1157
|
+
* @config recommended
|
|
1158
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unused-private-class-members}
|
|
1159
|
+
*/
|
|
1160
|
+
// 'no-unused-private-class-members': 'off',
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Disallow unused variables.
|
|
1164
|
+
* @config recommended
|
|
1165
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unused-vars}
|
|
1166
|
+
*/
|
|
1167
|
+
// 'no-unused-vars': 'off',
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* Disallow useless backreferences in regular expressions.
|
|
1171
|
+
* @config recommended
|
|
1172
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-backreference}
|
|
1173
|
+
*/
|
|
1174
|
+
// 'no-useless-backreference': 'off',
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Require calls to isNaN() when checking for NaN.
|
|
1178
|
+
* @config recommended
|
|
1179
|
+
* @see {@link https://eslint.org/docs/latest/rules/use-isnan}
|
|
1180
|
+
*/
|
|
1181
|
+
// 'use-isnan': 'off',
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Enforce comparing typeof expressions against valid strings.
|
|
1185
|
+
* @config recommended
|
|
1186
|
+
* @see {@link https://eslint.org/docs/latest/rules/valid-typeof}
|
|
1187
|
+
*/
|
|
1188
|
+
// 'valid-typeof': 'off',
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Disallow lexical declarations in case clauses.
|
|
1192
|
+
* @config recommended
|
|
1193
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-case-declarations}
|
|
1194
|
+
*/
|
|
1195
|
+
// 'no-case-declarations': 'off',
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* Disallow deleting variables.
|
|
1199
|
+
* @config recommended
|
|
1200
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-delete-var}
|
|
1201
|
+
*/
|
|
1202
|
+
// 'no-delete-var': 'off',
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* Disallow empty block statements.
|
|
1206
|
+
* @config recommended
|
|
1207
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-empty}
|
|
1208
|
+
*/
|
|
1209
|
+
// 'no-empty': 'off',
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* Disallow empty static blocks.
|
|
1213
|
+
* @config recommended
|
|
1214
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-empty-static-block}
|
|
1215
|
+
*/
|
|
1216
|
+
// 'no-empty-static-block': 'off',
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* Disallow unnecessary boolean casts.
|
|
1220
|
+
* @config recommended
|
|
1221
|
+
* @fixable
|
|
1222
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-extra-boolean-cast}
|
|
1223
|
+
*/
|
|
1224
|
+
// 'no-extra-boolean-cast': 'off',
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* Disallow assignments to native objects or read-only global variables.
|
|
1228
|
+
* @config recommended
|
|
1229
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-global-assign}
|
|
1230
|
+
*/
|
|
1231
|
+
// 'no-global-assign': 'off',
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* Disallow \8 and \9 escape sequences in string literals.
|
|
1235
|
+
* @config recommended
|
|
1236
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape}
|
|
1237
|
+
*/
|
|
1238
|
+
// 'no-nonoctal-decimal-escape': 'off',
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Disallow octal literals.
|
|
1242
|
+
* @config recommended
|
|
1243
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-octal}
|
|
1244
|
+
*/
|
|
1245
|
+
// 'no-octal': 'off',
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Disallow variable redeclaration.
|
|
1249
|
+
* @config recommended
|
|
1250
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-redeclare}
|
|
1251
|
+
*/
|
|
1252
|
+
// 'no-redeclare': 'off',
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* Disallow multiple spaces in regular expressions.
|
|
1256
|
+
* @config recommended
|
|
1257
|
+
* @fixable
|
|
1258
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-regex-spaces}
|
|
1259
|
+
*/
|
|
1260
|
+
// 'no-regex-spaces': 'off',
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* Disallow identifiers from shadowing restricted names.
|
|
1264
|
+
* @config recommended
|
|
1265
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-shadow-restricted-names}
|
|
1266
|
+
*/
|
|
1267
|
+
// 'no-shadow-restricted-names': 'off',
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* Disallow unused labels.
|
|
1271
|
+
* @config recommended
|
|
1272
|
+
* @fixable
|
|
1273
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-unused-labels}
|
|
1274
|
+
*/
|
|
1275
|
+
// 'no-unused-labels': 'off',
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Disallow unnecessary catch clauses.
|
|
1279
|
+
* @config recommended
|
|
1280
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-catch}
|
|
1281
|
+
*/
|
|
1282
|
+
// 'no-useless-catch': 'off',
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Disallow unnecessary escape characters.
|
|
1286
|
+
* @config recommended
|
|
1287
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-useless-escape}
|
|
1288
|
+
*/
|
|
1289
|
+
// 'no-useless-escape': 'off',
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* Disallow with statements.
|
|
1293
|
+
* @config recommended
|
|
1294
|
+
* @see {@link https://eslint.org/docs/latest/rules/no-with}
|
|
1295
|
+
*/
|
|
1296
|
+
// 'no-with': 'off',
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* Require generator functions to contain yield.
|
|
1300
|
+
* @config recommended
|
|
1301
|
+
* @see {@link https://eslint.org/docs/latest/rules/require-yield}
|
|
1302
|
+
*/
|
|
1303
|
+
// 'require-yield': 'off',
|
|
1304
|
+
},
|
|
1305
|
+
});
|