@@ -182,231 +182,226 @@ rules:
182
182
# #############################################################################
183
183
184
184
# Possible Errors
185
- # https://eslint.org/docs/rules/#possible-errors
185
+ # https://eslint.org/docs/latest/ rules/#possible-problems
186
186
187
+ array-callback-return : error
188
+ constructor-super : error
187
189
for-direction : error
188
190
getter-return : error
189
191
no-async-promise-executor : error
190
192
no-await-in-loop : error
193
+ no-class-assign : error
191
194
no-compare-neg-zero : error
192
195
no-cond-assign : error
196
+ no-const-assign : error
193
197
no-constant-binary-expression : error
194
- no-console : warn
195
198
no-constant-condition : error
199
+ no-constructor-return : error
196
200
no-control-regex : error
197
201
no-debugger : warn
198
202
no-dupe-args : error
203
+ no-dupe-class-members : error
199
204
no-dupe-else-if : error
200
205
no-dupe-keys : error
201
206
no-duplicate-case : error
202
- no-empty : error
207
+ no-duplicate-imports : off # Superseded by `import/no-duplicates`
203
208
no-empty-character-class : error
209
+ no-empty-pattern : error
204
210
no-ex-assign : error
205
- no-extra-boolean-cast : error
211
+ no-fallthrough : error
206
212
no-func-assign : error
207
213
no-import-assign : error
208
214
no-inner-declarations : [error, both]
209
215
no-invalid-regexp : error
210
216
no-irregular-whitespace : error
211
217
no-loss-of-precision : error
212
218
no-misleading-character-class : error
219
+ no-new-symbol : error
213
220
no-obj-calls : error
214
221
no-promise-executor-return : off # TODO
215
222
no-prototype-builtins : error
216
- no-regex-spaces : error
223
+ no-self-assign : error
224
+ no-self-compare : off # TODO
217
225
no-setter-return : error
218
226
no-sparse-arrays : error
219
227
no-template-curly-in-string : error
228
+ no-this-before-super : error
229
+ no-undef : error
230
+ no-unexpected-multiline : off
231
+ no-unmodified-loop-condition : error
220
232
no-unreachable : error
221
233
no-unreachable-loop : error
222
234
no-unsafe-finally : error
223
235
no-unsafe-negation : error
224
236
no-unsafe-optional-chaining : [error, { disallowArithmeticOperators: true }]
225
237
no-unused-private-class-members : error
238
+ no-unused-vars : [error, { vars: all, args: all, argsIgnorePattern: '^_' }]
239
+ no-use-before-define : off
226
240
no-useless-backreference : error
227
241
require-atomic-updates : error
228
242
use-isnan : error
229
243
valid-typeof : error
230
244
231
- # Best Practices
232
- # https://eslint.org/docs/rules/#best-practices
245
+ # Suggestions
246
+ # https://eslint.org/docs/latest/ rules/#suggestions
233
247
234
248
accessor-pairs : error
235
- array-callback-return : error
249
+ arrow-body-style : error
236
250
block-scoped-var : error
251
+ camelcase : error
252
+ capitalized-comments : off # maybe
237
253
class-methods-use-this : off
238
254
complexity : off
239
255
consistent-return : off
256
+ consistent-this : off
240
257
curly : error
241
258
default-case : off
242
259
default-case-last : error
243
260
default-param-last : error
244
261
dot-notation : error
245
262
eqeqeq : [error, smart]
263
+ func-name-matching : off
264
+ func-names : [error, as-needed] # improve debug experience
265
+ func-style : off
246
266
grouped-accessor-pairs : error
247
267
guard-for-in : error
268
+ id-denylist : off
269
+ id-length : off
270
+ id-match : [error, '^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$']
271
+ init-declarations : off
272
+ logical-assignment-operators : error
248
273
max-classes-per-file : off
274
+ max-depth : off
275
+ max-lines : off
276
+ max-lines-per-function : off
277
+ max-nested-callbacks : off
278
+ max-params : [error, 5] # TODO: drop to default number, which is 3
279
+ max-statements : off
280
+ multiline-comment-style : off
281
+ new-cap : error
249
282
no-alert : error
283
+ no-array-constructor : error
284
+ no-bitwise : off
250
285
no-caller : error
251
286
no-case-declarations : error
252
- no-constructor-return : error
287
+ no-confusing-arrow : off
288
+ no-console : warn
289
+ no-continue : off
290
+ no-delete-var : error
253
291
no-div-regex : error
254
292
no-else-return : error
293
+ no-empty : error
255
294
no-empty-function : error
256
- no-empty-pattern : error
257
295
no-eq-null : off
258
296
no-eval : error
259
297
no-extend-native : error
260
298
no-extra-bind : error
299
+ no-extra-boolean-cast : error
261
300
no-extra-label : error
262
- no-fallthrough : error
301
+ no-extra-semi : off
302
+ no-floating-decimal : off
263
303
no-global-assign : error
264
304
no-implicit-coercion : error
265
305
no-implicit-globals : off
266
306
no-implied-eval : error
307
+ no-inline-comments : off
267
308
no-invalid-this : error
268
309
no-iterator : error
310
+ no-label-var : error
269
311
no-labels : error
270
312
no-lone-blocks : error
313
+ no-lonely-if : error
271
314
no-loop-func : error
272
315
no-magic-numbers : off
316
+ no-mixed-operators : off
317
+ no-multi-assign : off
273
318
no-multi-str : error
319
+ no-negated-condition : off
320
+ no-nested-ternary : off
274
321
no-new : error
275
322
no-new-func : error
323
+ no-new-object : error
276
324
no-new-wrappers : error
277
325
no-nonoctal-decimal-escape : error
278
326
no-octal : error
279
327
no-octal-escape : error
280
328
no-param-reassign : error
329
+ no-plusplus : off
281
330
no-proto : error
282
331
no-redeclare : error
332
+ no-regex-spaces : error
333
+ no-restricted-exports : off
334
+ no-restricted-globals : off
335
+ no-restricted-imports : off
283
336
no-restricted-properties : off
337
+ no-restricted-syntax : off
284
338
no-return-assign : error
285
339
no-return-await : error
286
340
no-script-url : error
287
- no-self-assign : error
288
- no-self-compare : off # TODO
289
341
no-sequences : error
342
+ no-shadow : error
343
+ no-shadow-restricted-names : error
344
+ no-ternary : off
290
345
no-throw-literal : error
291
- no-unmodified-loop-condition : error
346
+ no-undef-init : error
347
+ no-undefined : off
348
+ no-underscore-dangle : off # TODO
349
+ no-unneeded-ternary : error
292
350
no-unused-expressions : error
293
351
no-unused-labels : error
294
352
no-useless-call : error
295
353
no-useless-catch : error
354
+ no-useless-computed-key : error
296
355
no-useless-concat : error
356
+ no-useless-constructor : error
297
357
no-useless-escape : error
358
+ no-useless-rename : error
298
359
no-useless-return : error
360
+ no-var : error
299
361
no-void : error
300
362
no-warning-comments : off
301
363
no-with : error
364
+ object-shorthand : error
365
+ one-var : [error, never]
366
+ one-var-declaration-per-line : off
367
+ operator-assignment : error
368
+ prefer-arrow-callback : error
369
+ prefer-const : error
370
+ prefer-destructuring : off
371
+ prefer-exponentiation-operator : error
302
372
prefer-named-capture-group : off # ES2018
373
+ prefer-numeric-literals : error
374
+ prefer-object-has-own : off # TODO requires Node.js v16.9.0
375
+ prefer-object-spread : error
303
376
prefer-promise-reject-errors : error
304
377
prefer-regex-literals : error
378
+ prefer-rest-params : off # TODO
379
+ prefer-spread : error
380
+ prefer-template : off
381
+ quote-props : off # Superseded by prettier
305
382
radix : error
306
383
require-await : error
307
384
require-unicode-regexp : off
385
+ require-yield : error
386
+ sort-imports : off
387
+ sort-keys : off
388
+ sort-vars : off
389
+ spaced-comment : error
390
+ strict : error
391
+ symbol-description : off
308
392
vars-on-top : error
309
393
yoda : [error, never, { exceptRange: true }]
310
394
311
- # Strict Mode
312
- # https://eslint.org/docs/rules/#strict-mode
313
-
314
- strict : error
315
-
316
- # Variables
317
- # https://eslint.org/docs/rules/#variables
395
+ # Layout & Formatting
396
+ # https://eslint.org/docs/latest/rules/#layout--formatting
318
397
319
- init-declarations : off
320
- logical-assignment-operators : error
321
- no-delete-var : error
322
- no-label-var : error
323
- no-restricted-globals : off
324
- no-shadow : error
325
- no-shadow-restricted-names : error
326
- no-undef : error
327
- no-undef-init : error
328
- no-undefined : off
329
- no-unused-vars : [error, { vars: all, args: all, argsIgnorePattern: '^_' }]
330
- no-use-before-define : off
331
-
332
- # Stylistic Issues
333
- # https://eslint.org/docs/rules/#stylistic-issues
334
-
335
- camelcase : error
336
- capitalized-comments : off # maybe
337
- consistent-this : off
338
- func-name-matching : off
339
- func-names : [error, as-needed] # improve debug experience
340
- func-style : off
341
- id-denylist : off
342
- id-length : off
343
- id-match : [error, '^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$']
344
398
line-comment-position : off
345
399
lines-around-comment : off
346
400
lines-between-class-members : [error, always, { exceptAfterSingleLine: true }]
347
- max-depth : off
348
- max-lines : off
349
- max-lines-per-function : off
350
- max-nested-callbacks : off
351
- max-params : [error, 5] # TODO: drop to default number, which is 3
352
- max-statements : off
353
401
max-statements-per-line : off
354
- multiline-comment-style : off
355
- new-cap : error
356
- no-array-constructor : error
357
- no-bitwise : off
358
- no-continue : off
359
- no-inline-comments : off
360
- no-lonely-if : error
361
- no-multi-assign : off
362
- no-negated-condition : off
363
- no-nested-ternary : off
364
- no-new-object : error
365
- no-plusplus : off
366
- no-restricted-syntax : off
367
402
no-tabs : error
368
- no-ternary : off
369
- no-underscore-dangle : off # TODO
370
- no-unneeded-ternary : error
371
- one-var : [error, never]
372
- operator-assignment : error
373
403
padding-line-between-statements : off
374
- prefer-exponentiation-operator : error
375
- prefer-object-spread : error
376
404
quotes : [error, single, { avoidEscape: true }]
377
- sort-keys : off
378
- sort-vars : off
379
- spaced-comment : error
380
-
381
- # ECMAScript 6
382
- # https://eslint.org/docs/rules/#ecmascript-6
383
-
384
- arrow-body-style : error
385
- constructor-super : error
386
- no-class-assign : error
387
- no-const-assign : error
388
- no-dupe-class-members : error
389
- no-duplicate-imports : off # Superseded by `import/no-duplicates`
390
- no-new-symbol : error
391
- no-restricted-exports : off
392
- no-restricted-imports : off
393
- no-this-before-super : error
394
- no-useless-computed-key : error
395
- no-useless-constructor : error
396
- no-useless-rename : error
397
- no-var : error
398
- object-shorthand : error
399
- prefer-arrow-callback : error
400
- prefer-const : error
401
- prefer-destructuring : off
402
- prefer-numeric-literals : error
403
- prefer-object-has-own : off # TODO requires Node.js v16.9.0
404
- prefer-rest-params : off # TODO
405
- prefer-spread : error
406
- prefer-template : off
407
- require-yield : error
408
- sort-imports : off
409
- symbol-description : off
410
405
411
406
# Bellow rules are disabled because coflicts with Prettier, see:
412
407
# https://github.com/prettier/eslint-config-prettier/blob/master/index.js
@@ -437,25 +432,18 @@ rules:
437
432
multiline-ternary : off
438
433
newline-per-chained-call : off
439
434
new-parens : off
440
- no-confusing-arrow : off
441
435
no-extra-parens : off
442
- no-extra-semi : off
443
- no-floating-decimal : off
444
- no-mixed-operators : off
445
436
no-mixed-spaces-and-tabs : off
446
437
no-multi-spaces : off
447
438
no-multiple-empty-lines : off
448
439
no-trailing-spaces : off
449
- no-unexpected-multiline : off
450
440
no-whitespace-before-property : off
451
441
nonblock-statement-body-position : off
452
442
object-curly-newline : off
453
443
object-curly-spacing : off
454
444
object-property-newline : off
455
- one-var-declaration-per-line : off
456
445
operator-linebreak : off
457
446
padded-blocks : off
458
- quote-props : off
459
447
rest-spread-spacing : off
460
448
semi : off
461
449
semi-spacing : off
0 commit comments