-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
eslint.config.js
2258 lines (2203 loc) · 85.4 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import globals from 'globals';
import confusingBrowserGlobals from 'confusing-browser-globals';
import parserJSONC from 'jsonc-eslint-parser';
import pluginArrayFunc from 'eslint-plugin-array-func';
import pluginCanonical from 'eslint-plugin-canonical';
import pluginDepend from 'eslint-plugin-depend';
import pluginESX from 'eslint-plugin-es-x';
import pluginESlintComments from '@eslint-community/eslint-plugin-eslint-comments';
import pluginImport from 'eslint-plugin-import-x';
import pluginJSONC from 'eslint-plugin-jsonc';
import pluginMarkdown from '@eslint/markdown';
import pluginN from 'eslint-plugin-n';
import * as pluginPackageJSON from 'eslint-plugin-package-json';
import pluginPromise from 'eslint-plugin-promise';
import pluginQUnit from 'eslint-plugin-qunit';
import pluginReDoS from 'eslint-plugin-redos';
import pluginRegExp from 'eslint-plugin-regexp';
import pluginSonarJS from 'eslint-plugin-sonarjs';
import pluginStylisticJS from '@stylistic/eslint-plugin-js';
import pluginStylisticPlus from '@stylistic/eslint-plugin-plus';
import pluginUnicorn from 'eslint-plugin-unicorn';
const PACKAGES_NODE_VERSIONS = '8.9.0';
const DEV_NODE_VERSIONS = '^18.12';
const ERROR = 'error';
const OFF = 'off';
const ALWAYS = 'always';
const NEVER = 'never';
const READONLY = 'readonly';
function disable(rules) {
return Object.fromEntries(Object.keys(rules).map(key => [key, OFF]));
}
const base = {
// possible problems:
// enforces return statements in callbacks of array's methods
'array-callback-return': ERROR,
// require `super()` calls in constructors
'constructor-super': ERROR,
// enforce 'for' loop update clause moving the counter in the right direction
'for-direction': ERROR,
// disallow using an async function as a `Promise` executor
'no-async-promise-executor': ERROR,
// disallow reassigning class members
'no-class-assign': ERROR,
// disallow comparing against -0
'no-compare-neg-zero': ERROR,
// disallow reassigning `const` variables
'no-const-assign': ERROR,
// disallows expressions where the operation doesn't affect the value
'no-constant-binary-expression': ERROR,
// disallow constant expressions in conditions
'no-constant-condition': [ERROR, { checkLoops: false }],
// disallow returning value from constructor
'no-constructor-return': ERROR,
// disallow use of debugger
'no-debugger': ERROR,
// disallow duplicate arguments in functions
'no-dupe-args': ERROR,
// disallow duplicate class members
'no-dupe-class-members': ERROR,
// disallow duplicate conditions in if-else-if chains
'no-dupe-else-if': ERROR,
// disallow duplicate keys when creating object literals
'no-dupe-keys': ERROR,
// disallow a duplicate case label
'no-duplicate-case': ERROR,
// disallow duplicate module imports
'no-duplicate-imports': ERROR,
// disallow empty destructuring patterns
'no-empty-pattern': ERROR,
// disallow assigning to the exception in a catch block
'no-ex-assign': ERROR,
// disallow fallthrough of case statements
'no-fallthrough': [ERROR, { commentPattern: 'break omitted' }],
// disallow overwriting functions written as function declarations
'no-func-assign': ERROR,
// disallow assigning to imported bindings
'no-import-assign': ERROR,
// disallow irregular whitespace outside of strings and comments
'no-irregular-whitespace': ERROR,
// disallow literal numbers that lose precision
'no-loss-of-precision': ERROR,
// disallow `new` operators with global non-constructor functions
'no-new-native-nonconstructor': ERROR,
// disallow the use of object properties of the global object (Math and JSON) as functions
'no-obj-calls': ERROR,
// disallow use of Object.prototypes builtins directly
'no-prototype-builtins': ERROR,
// disallow self assignment
'no-self-assign': ERROR,
// disallow comparisons where both sides are exactly the same
'no-self-compare': ERROR,
// disallow sparse arrays
'no-sparse-arrays': ERROR,
// disallow template literal placeholder syntax in regular strings
'no-template-curly-in-string': ERROR,
// disallow `this` / `super` before calling `super()` in constructors
'no-this-before-super': ERROR,
// disallow unmodified loop conditions
'no-unmodified-loop-condition': ERROR,
// disallow use of undeclared variables unless mentioned in a /*global */ block
'no-undef': [ERROR, { typeof: false }],
// disallow control flow statements in `finally` blocks
'no-unsafe-finally': ERROR,
// avoid code that looks like two expressions but is actually one
'no-unexpected-multiline': ERROR,
// disallow unreachable statements after a return, throw, continue, or break statement
'no-unreachable': ERROR,
// disallow loops with a body that allows only one iteration
'no-unreachable-loop': ERROR,
// disallow negation of the left operand of an in expression
'no-unsafe-negation': ERROR,
// disallow use of optional chaining in contexts where the `undefined` value is not allowed
'no-unsafe-optional-chaining': ERROR,
// disallow unused private class members
'no-unused-private-class-members': ERROR,
// disallow declaration of variables that are not used in the code
'no-unused-vars': [ERROR, {
vars: 'all',
args: 'after-used',
caughtErrors: 'none',
ignoreRestSiblings: true,
}],
// disallow variable assignments when the value is not used
'no-useless-assignment': ERROR,
// require or disallow the Unicode Byte Order Mark
'unicode-bom': [ERROR, NEVER],
// disallow comparisons with the value NaN
'use-isnan': ERROR,
// ensure that the results of typeof are compared against a valid string
'valid-typeof': ERROR,
// suggestions:
// enforce the use of variables within the scope they are defined
'block-scoped-var': ERROR,
// require camel case names
camelcase: [ERROR, {
properties: NEVER,
ignoreDestructuring: true,
ignoreImports: true,
ignoreGlobals: true,
}],
// enforce default clauses in switch statements to be last
'default-case-last': ERROR,
// enforce default parameters to be last
'default-param-last': ERROR,
// encourages use of dot notation whenever possible
'dot-notation': [ERROR, { allowKeywords: true }],
// require the use of === and !==
eqeqeq: [ERROR, 'smart'],
// require grouped accessor pairs in object literals and classes
'grouped-accessor-pairs': [ERROR, 'getBeforeSet'],
// require identifiers to match a specified regular expression
'id-match': [ERROR, '^[$A-Za-z]|(?:[A-Z][A-Z\\d_]*[A-Z\\d])|(?:[$A-Za-z]\\w*[A-Za-z\\d])$', {
onlyDeclarations: true,
ignoreDestructuring: true,
}],
// require logical assignment operator shorthand
'logical-assignment-operators': [ERROR, ALWAYS],
// enforce a maximum depth that blocks can be nested
'max-depth': [ERROR, { max: 5 }],
// enforce a maximum depth that callbacks can be nested
'max-nested-callbacks': [ERROR, { max: 4 }],
// specify the maximum number of statement allowed in a function
'max-statements': [ERROR, { max: 50 }],
// require a capital letter for constructors
'new-cap': [ERROR, { newIsCap: true, capIsNew: false }],
// disallow window alert / confirm / prompt calls
'no-alert': ERROR,
// disallow use of arguments.caller or arguments.callee
'no-caller': ERROR,
// disallow lexical declarations in case/default clauses
'no-case-declarations': ERROR,
// disallow use of console
'no-console': ERROR,
// disallow deletion of variables
'no-delete-var': ERROR,
// disallow else after a return in an if
'no-else-return': [ERROR, { allowElseIf: false }],
// disallow empty statements
'no-empty': ERROR,
// disallow empty functions, except for standalone funcs/arrows
'no-empty-function': ERROR,
// disallow empty static blocks
'no-empty-static-block': ERROR,
// disallow `null` comparisons without type-checking operators
'no-eq-null': ERROR,
// disallow use of eval()
'no-eval': ERROR,
// disallow adding to native types
'no-extend-native': ERROR,
// disallow unnecessary function binding
'no-extra-bind': ERROR,
// disallow unnecessary boolean casts
'no-extra-boolean-cast': [ERROR, { enforceForInnerExpressions: true }],
// disallow unnecessary labels
'no-extra-label': ERROR,
// disallow reassignments of native objects
'no-global-assign': ERROR,
// disallow use of eval()-like methods
'no-implied-eval': ERROR,
// disallow usage of __iterator__ property
'no-iterator': ERROR,
// disallow labels that share a name with a variable
'no-label-var': ERROR,
// disallow use of labels for anything other then loops and switches
'no-labels': [ERROR, { allowLoop: false, allowSwitch: false }],
// disallow unnecessary nested blocks
'no-lone-blocks': ERROR,
// disallow `if` as the only statement in an `else` block
'no-lonely-if': ERROR,
// disallow function declarations and expressions inside loop statements
'no-loop-func': OFF,
// disallow use of multiline strings
'no-multi-str': ERROR,
// disallow use of new operator when not part of the assignment or comparison
'no-new': ERROR,
// disallow use of new operator for Function object
'no-new-func': ERROR,
// disallows creating new instances of String, Number, and Boolean
'no-new-wrappers': ERROR,
// disallow `\8` and `\9` escape sequences in string literals
'no-nonoctal-decimal-escape': ERROR,
// disallow calls to the `Object` constructor without an argument
'no-object-constructor': ERROR,
// disallow use of (old style) octal literals
'no-octal': ERROR,
// disallow use of octal escape sequences in string literals, such as var foo = 'Copyright \251';
'no-octal-escape': ERROR,
// disallow usage of __proto__ property
'no-proto': ERROR,
// disallow declaring the same variable more then once
'no-redeclare': [ERROR, { builtinGlobals: false }],
// disallow specific global variables
'no-restricted-globals': [ERROR, ...confusingBrowserGlobals],
// disallow specified syntax
'no-restricted-syntax': [ERROR,
{
selector: 'ForInStatement',
message: '`for-in` loops are disallowed since iterate over the prototype chain',
},
],
// disallow use of `javascript:` urls.
'no-script-url': ERROR,
// disallow use of comma operator
'no-sequences': ERROR,
// disallow declaration of variables already declared in the outer scope
'no-shadow': ERROR,
// disallow shadowing of names such as arguments
'no-shadow-restricted-names': ERROR,
// restrict what can be thrown as an exception
'no-throw-literal': ERROR,
// disallow initializing variables to `undefined`
'no-undef-init': ERROR,
// disallow dangling underscores in identifiers
'no-underscore-dangle': ERROR,
// disallow the use of boolean literals in conditional expressions and prefer `a || b` over `a ? a : b`
'no-unneeded-ternary': [ERROR, { defaultAssignment: false }],
// disallow usage of expressions in statement position
'no-unused-expressions': [ERROR, {
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
}],
// disallow unused labels
'no-unused-labels': ERROR,
// disallow unnecessary calls to `.call()` and `.apply()`
'no-useless-call': ERROR,
// disallow unnecessary catch clauses
'no-useless-catch': ERROR,
// disallow unnecessary computed property keys in object literals
'no-useless-computed-key': ERROR,
// disallow useless string concatenation
'no-useless-concat': ERROR,
// disallow unnecessary constructors
'no-useless-constructor': ERROR,
// disallow unnecessary escape characters
'no-useless-escape': ERROR,
// disallow renaming import, export, and destructured assignments to the same name
'no-useless-rename': ERROR,
// disallow redundant return statements
'no-useless-return': ERROR,
// require let or const instead of var
'no-var': ERROR,
// disallow void operators
'no-void': ERROR,
// disallow use of the with statement
'no-with': ERROR,
// require or disallow method and property shorthand syntax for object literals
'object-shorthand': ERROR,
// require assignment operator shorthand where possible
'operator-assignment': [ERROR, 'always'],
// require using arrow functions for callbacks
'prefer-arrow-callback': ERROR,
// require const declarations for variables that are never reassigned after declared
'prefer-const': [ERROR, { destructuring: 'all' }],
// require destructuring from arrays and/or objects
'prefer-destructuring': [ERROR, {
VariableDeclarator: {
array: true,
object: true,
},
AssignmentExpression: {
array: true,
object: false,
},
}, {
enforceForRenamedProperties: false,
}],
// prefer the exponentiation operator over `Math.pow()`
'prefer-exponentiation-operator': ERROR,
// disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals
'prefer-numeric-literals': ERROR,
// prefer `Object.hasOwn`
'prefer-object-has-own': ERROR,
// disallow use of the `RegExp` constructor in favor of regular expression literals
'prefer-regex-literals': [ERROR, { disallowRedundantWrapping: true }],
// require rest parameters instead of `arguments`
'prefer-rest-params': ERROR,
// require spread operators instead of `.apply()`
'prefer-spread': ERROR,
// require template literals instead of string concatenation
'prefer-template': ERROR,
// require use of the second argument for parseInt()
radix: ERROR,
// disallow generator functions that do not have `yield`
'require-yield': ERROR,
// require strict mode directives
strict: [ERROR, 'global'],
// require symbol descriptions
'symbol-description': ERROR,
// disallow "Yoda" conditions
yoda: [ERROR, NEVER],
// layout & formatting:
// enforce spacing inside array brackets
'@stylistic/js/array-bracket-spacing': [ERROR, NEVER],
// require parentheses around arrow function arguments
'@stylistic/js/arrow-parens': [ERROR, 'as-needed'],
// enforce consistent spacing before and after the arrow in arrow functions
'@stylistic/js/arrow-spacing': ERROR,
// enforce spacing inside single-line blocks
'@stylistic/js/block-spacing': [ERROR, ALWAYS],
// enforce one true brace style
'@stylistic/js/brace-style': [ERROR, '1tbs', { allowSingleLine: true }],
// enforce trailing commas in multiline object literals
'@stylistic/js/comma-dangle': [ERROR, 'always-multiline'],
// enforce spacing after comma
'@stylistic/js/comma-spacing': ERROR,
// enforce one true comma style
'@stylistic/js/comma-style': [ERROR, 'last'],
// disallow padding inside computed properties
'@stylistic/js/computed-property-spacing': [ERROR, NEVER],
// enforce newline before and after dot
'@stylistic/js/dot-location': [ERROR, 'property'],
// enforce one newline at the end of files
'@stylistic/js/eol-last': [ERROR, ALWAYS],
// disallow space between function identifier and application
'@stylistic/js/function-call-spacing': ERROR,
// require spacing around the `*` in `function *` expressions
'@stylistic/js/generator-star-spacing': [ERROR, 'both'],
// enforce the location of arrow function bodies
'@stylistic/js/implicit-arrow-linebreak': [ERROR, 'beside'],
// enforce consistent indentation
'@stylistic/js/indent': [ERROR, 2, {
ignoredNodes: ['ConditionalExpression'],
SwitchCase: 1,
VariableDeclarator: 'first',
}],
// enforces spacing between keys and values in object literal properties
'@stylistic/js/key-spacing': [ERROR, { beforeColon: false, afterColon: true }],
// require a space before & after certain keywords
'@stylistic/js/keyword-spacing': [ERROR, { before: true, after: true }],
// enforce consistent linebreak style
'@stylistic/js/linebreak-style': [ERROR, 'unix'],
// specify the maximum length of a line in your program
'@stylistic/js/max-len': [ERROR, {
code: 140,
tabWidth: 2,
ignoreRegExpLiterals: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
}],
// enforce a maximum number of statements allowed per line
'@stylistic/js/max-statements-per-line': [ERROR, { max: 2 }],
// require parentheses when invoking a constructor with no arguments
'@stylistic/js/new-parens': ERROR,
// disallow unnecessary semicolons
'@stylistic/js/no-extra-semi': ERROR,
// disallow the use of leading or trailing decimal points in numeric literals
'@stylistic/js/no-floating-decimal': ERROR,
// disallow mixed spaces and tabs for indentation
'@stylistic/js/no-mixed-spaces-and-tabs': ERROR,
// disallow use of multiple spaces
'@stylistic/js/no-multi-spaces': [ERROR, { ignoreEOLComments: true }],
// disallow multiple empty lines and only one newline at the end
'@stylistic/js/no-multiple-empty-lines': [ERROR, { max: 1, maxEOF: 1 }],
// disallow tabs
'@stylistic/js/no-tabs': ERROR,
// disallow trailing whitespace at the end of lines
'@stylistic/js/no-trailing-spaces': ERROR,
// disallow whitespace before properties
'@stylistic/js/no-whitespace-before-property': ERROR,
// enforce the location of single-line statements
'@stylistic/js/nonblock-statement-body-position': [ERROR, 'beside'],
// enforce consistent line breaks after opening and before closing braces
'@stylistic/js/object-curly-newline': [ERROR, { consistent: true }],
// enforce spaces inside braces
'@stylistic/js/object-curly-spacing': [ERROR, ALWAYS],
// require newlines around variable declarations with initializations
'@stylistic/js/one-var-declaration-per-line': [ERROR, 'initializations'],
// enforce padding within blocks
'@stylistic/js/padded-blocks': [ERROR, NEVER],
// disallow blank lines after 'use strict'
'@stylistic/js/padding-line-between-statements': [ERROR, { blankLine: NEVER, prev: 'directive', next: '*' }],
// require or disallow use of quotes around object literal property names
'@stylistic/js/quote-props': [ERROR, 'as-needed', { keywords: false }],
// specify whether double or single quotes should be used
'@stylistic/js/quotes': [ERROR, 'single', { avoidEscape: true }],
// enforce spacing between rest and spread operators and their expressions
'@stylistic/js/rest-spread-spacing': ERROR,
// require or disallow use of semicolons instead of ASI
'@stylistic/js/semi': [ERROR, ALWAYS],
// enforce spacing before and after semicolons
'@stylistic/js/semi-spacing': ERROR,
// enforce location of semicolons
'@stylistic/js/semi-style': [ERROR, 'last'],
// require or disallow space before blocks
'@stylistic/js/space-before-blocks': ERROR,
// require or disallow space before function opening parenthesis
'@stylistic/js/space-before-function-paren': [ERROR, { anonymous: ALWAYS, named: NEVER }],
// require or disallow spaces inside parentheses
'@stylistic/js/space-in-parens': ERROR,
// require spaces around operators
'@stylistic/js/space-infix-ops': ERROR,
// require or disallow spaces before/after unary operators
'@stylistic/js/space-unary-ops': ERROR,
// require or disallow a space immediately following the // or /* in a comment
'@stylistic/js/spaced-comment': [ERROR, ALWAYS, {
line: { exceptions: ['/'] },
block: { exceptions: ['*'] },
}],
// enforce spacing around colons of switch statements
'@stylistic/js/switch-colon-spacing': ERROR,
// require or disallow spacing around embedded expressions of template strings
'@stylistic/js/template-curly-spacing': [ERROR, ALWAYS],
// disallow spacing between template tags and their literals
'@stylistic/js/template-tag-spacing': [ERROR, NEVER],
// require spacing around the `*` in `yield *` expressions
'@stylistic/js/yield-star-spacing': [ERROR, 'both'],
// enforce consistent line breaks after opening and before closing braces
'@stylistic/plus/curly-newline': [ERROR, { consistent: true }],
// import:
// forbid any invalid exports, i.e. re-export of the same name
'import/export': ERROR,
// ensure all imports appear before other statements
'import/first': ERROR,
// enforce a newline after import statements
'import/newline-after-import': ERROR,
// forbid import of modules using absolute paths
'import/no-absolute-path': ERROR,
// forbid AMD imports
'import/no-amd': ERROR,
// forbid cycle dependencies
'import/no-cycle': [ERROR, { commonjs: true }],
// disallow importing from the same path more than once
'import/no-duplicates': ERROR,
// forbid `require()` calls with expressions
'import/no-dynamic-require': ERROR,
// forbid empty named import blocks
'import/no-empty-named-blocks': ERROR,
// forbid imports with CommonJS exports
'import/no-import-module-exports': ERROR,
// forbid a module from importing itself
'import/no-self-import': ERROR,
// ensure imports point to files / modules that can be resolved
'import/no-unresolved': [ERROR, { commonjs: true }],
// forbid useless path segments
'import/no-useless-path-segments': ERROR,
// forbid Webpack loader syntax in imports
'import/no-webpack-loader-syntax': ERROR,
// node:
// enforce the style of file extensions in `import` declarations
'node/file-extension-in-import': ERROR,
// require require() calls to be placed at top-level module scope
'node/global-require': ERROR,
// disallow deprecated APIs
'node/no-deprecated-api': ERROR,
// disallow the assignment to `exports`
'node/no-exports-assign': ERROR,
// disallow require calls to be mixed with regular variable declarations
'node/no-mixed-requires': [ERROR, { grouping: true, allowCall: false }],
// disallow new operators with calls to require
'node/no-new-require': ERROR,
// disallow string concatenation with `__dirname` and `__filename`
'node/no-path-concat': ERROR,
// disallow the use of `process.exit()`
'node/no-process-exit': ERROR,
// disallow synchronous methods
'node/no-sync': ERROR,
// prefer `node:` protocol
'node/prefer-node-protocol': ERROR,
// prefer global
'node/prefer-global/buffer': [ERROR, ALWAYS],
'node/prefer-global/console': [ERROR, ALWAYS],
'node/prefer-global/process': [ERROR, ALWAYS],
'node/prefer-global/text-decoder': [ERROR, ALWAYS],
'node/prefer-global/text-encoder': [ERROR, ALWAYS],
'node/prefer-global/url-search-params': [ERROR, ALWAYS],
'node/prefer-global/url': [ERROR, ALWAYS],
// prefer promises
'node/prefer-promises/dns': ERROR,
'node/prefer-promises/fs': ERROR,
// array-func:
// avoid reversing the array and running a method on it if there is an equivalent of the method operating on the array from the other end
'array-func/avoid-reverse': ERROR,
// prefer using the `mapFn` callback of `Array.from` over an immediate `.map()` call on the `Array.from` result
'array-func/from-map': ERROR,
// avoid the `this` parameter when providing arrow function as callback in array functions
'array-func/no-unnecessary-this-arg': ERROR,
// promise:
// enforces the use of `catch()` on un-returned promises
'promise/catch-or-return': ERROR,
// avoid calling `cb()` inside of a `then()` or `catch()`
'promise/no-callback-in-promise': ERROR,
// disallow creating new promises with paths that resolve multiple times
'promise/no-multiple-resolved': ERROR,
// avoid nested `then()` or `catch()` statements
'promise/no-nesting': ERROR,
// avoid calling new on a `Promise` static method
'promise/no-new-statics': ERROR,
// avoid using promises inside of callbacks
'promise/no-promise-in-callback': ERROR,
// disallow return statements in `finally()`
'promise/no-return-in-finally': ERROR,
// avoid wrapping values in `Promise.resolve` or `Promise.reject` when not needed
'promise/no-return-wrap': ERROR,
// enforce consistent param names when creating new promises
'promise/param-names': [ERROR, {
resolvePattern: '^resolve',
rejectPattern: '^reject',
}],
// prefer `async` / `await` to the callback pattern
'promise/prefer-await-to-callbacks': ERROR,
// prefer `await` to `then()` / `catch()` / `finally()` for reading `Promise` values
'promise/prefer-await-to-then': [ERROR, { strict: true }],
// prefer catch to `then(a, b)` / `then(null, b)` for handling errors
'promise/prefer-catch': ERROR,
// disallow use of non-standard `Promise` static methods
'promise/spec-only': [OFF, { allowedMethods: [
'prototype', // `eslint-plugin-promise` bug, https://github.com/eslint-community/eslint-plugin-promise/issues/533
'try',
'undefined', // `eslint-plugin-promise` bug, https://github.com/eslint-community/eslint-plugin-promise/issues/534
] }],
// ensures the proper number of arguments are passed to `Promise` functions
'promise/valid-params': ERROR,
// unicorn
// enforce a specific parameter name in `catch` clauses
'unicorn/catch-error-name': [ERROR, { name: ERROR, ignore: [/^err/] }],
// prefer consistent types when spreading a ternary in an array literal
'unicorn/consistent-empty-array-spread': ERROR,
// enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`
'unicorn/consistent-existence-index-check': ERROR,
// enforce correct `Error` subclassing
'unicorn/custom-error-definition': ERROR,
// enforce passing a message value when throwing a built-in error
'unicorn/error-message': ERROR,
// require escape sequences to use uppercase values
'unicorn/escape-case': ERROR,
// enforce a case style for filenames
'unicorn/filename-case': [ERROR, { case: 'kebabCase' }],
// enforce specifying rules to disable in `eslint-disable` comments
'unicorn/no-abusive-eslint-disable': ERROR,
// enforce combining multiple `Array#push` into one call
'unicorn/no-array-push-push': ERROR,
// disallow using `await` in `Promise` method parameters
'unicorn/no-await-in-promise-methods': ERROR,
// do not use leading/trailing space between `console.log` parameters
'unicorn/no-console-spaces': ERROR,
// enforce the use of unicode escapes instead of hexadecimal escapes
'unicorn/no-hex-escape': ERROR,
// disallow invalid options in `fetch` and `Request`
'unicorn/no-invalid-fetch-options': ERROR,
// prevent calling `EventTarget#removeEventListener()` with the result of an expression
'unicorn/no-invalid-remove-event-listener': ERROR,
// disallow using `.length` as the end argument of `{ Array,String,TypedArray }#slice()`
'unicorn/no-length-as-slice-end': ERROR,
// disallow `if` statements as the only statement in `if` blocks without `else`
'unicorn/no-lonely-if': ERROR,
// disallow negated expression in equality check
'unicorn/no-negation-in-equality-check': ERROR,
// enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`
'unicorn/no-new-buffer': ERROR,
// disallow passing single-element arrays to `Promise` methods
'unicorn/no-single-promise-in-promise-methods': ERROR,
// forbid classes that only have static members
'unicorn/no-static-only-class': ERROR,
// disallow `then` property
'unicorn/no-thenable': ERROR,
// disallow comparing `undefined` using `typeof` when it's not required
'unicorn/no-typeof-undefined': ERROR,
// disallow awaiting non-promise values
'unicorn/no-unnecessary-await': ERROR,
// disallow unreadable array destructuring
'unicorn/no-unreadable-array-destructuring': ERROR,
// disallow unreadable IIFEs
'unicorn/no-unreadable-iife': ERROR,
// disallow unused object properties
'unicorn/no-unused-properties': ERROR,
// forbid useless fallback when spreading in object literals
'unicorn/no-useless-fallback-in-spread': ERROR,
// disallow useless array length check
'unicorn/no-useless-length-check': ERROR,
// disallow returning / yielding `Promise.{ resolve, reject }` in async functions or promise callbacks
'unicorn/no-useless-promise-resolve-reject': ERROR,
// disallow useless spread
'unicorn/no-useless-spread': ERROR,
// disallow useless `case` in `switch` statements
'unicorn/no-useless-switch-case': ERROR,
// enforce lowercase identifier and uppercase value for number literals
'unicorn/number-literal-case': ERROR,
// enforce the style of numeric separators by correctly grouping digits
'unicorn/numeric-separators-style': [ERROR, {
onlyIfContainsSeparator: true,
number: { minimumDigits: 0, groupLength: 3 },
binary: { minimumDigits: 0, groupLength: 4 },
octal: { minimumDigits: 0, groupLength: 4 },
hexadecimal: { minimumDigits: 0, groupLength: 2 },
}],
// prefer `.find()` over the first element from `.filter()`
'unicorn/prefer-array-find': [ERROR, { checkFromLast: true }],
// use `.flat()` to flatten an array of arrays
'unicorn/prefer-array-flat': ERROR,
// use `.flatMap()` to map and then flatten an array instead of using `.map().flat()`
'unicorn/prefer-array-flat-map': ERROR,
// prefer `Array#indexOf` over `Array#findIndex`` when looking for the index of an item
'unicorn/prefer-array-index-of': ERROR,
// prefer `.some()` over `.filter().length` check and `.find()`
'unicorn/prefer-array-some': ERROR,
// prefer `.at()` method for index access and `String#charAt()`
'unicorn/prefer-at': [ERROR, { checkAllIndexAccess: false }],
// prefer `Blob#{ arrayBuffer, text }` over `FileReader#{ readAsArrayBuffer, readAsText }`
'unicorn/prefer-blob-reading-methods': ERROR,
// prefer `Date.now()` to get the number of milliseconds since the Unix Epoch
'unicorn/prefer-date-now': ERROR,
// prefer default parameters over reassignment
'unicorn/prefer-default-parameters': ERROR,
// prefer `EventTarget` over `EventEmitter`
'unicorn/prefer-event-target': ERROR,
// prefer `globalThis` over `window`, `self`, and `global`
'unicorn/prefer-global-this': ERROR,
// prefer `.includes()` over `.indexOf()` and `Array#some()` when checking for existence or non-existence
'unicorn/prefer-includes': ERROR,
// prefer reading a `JSON` file as a buffer
'unicorn/prefer-json-parse-buffer': ERROR,
// prefer using a logical operator over a ternary
'unicorn/prefer-logical-operator-over-ternary': ERROR,
// prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons
'unicorn/prefer-math-min-max': ERROR,
// prefer modern `Math` APIs over legacy patterns
'unicorn/prefer-modern-math-apis': ERROR,
// prefer negative index over `.length - index` when possible
'unicorn/prefer-negative-index': ERROR,
// prefer using the `node:` protocol when importing Node builtin modules
'unicorn/prefer-node-protocol': ERROR,
// prefer using `Object.fromEntries()` to transform a list of key-value pairs into an object
'unicorn/prefer-object-from-entries': ERROR,
// prefer omitting the `catch` binding parameter
'unicorn/prefer-optional-catch-binding': ERROR,
// prefer using `structuredClone` to create a deep clone
'unicorn/prefer-structured-clone': ERROR,
// prefer using `Set#size` instead of `Array#length`
'unicorn/prefer-set-size': ERROR,
// prefer `String#replaceAll()` over regex searches with the global flag
'unicorn/prefer-string-replace-all': ERROR,
// prefer `String#{ startsWith, endsWith }()` over `RegExp#test()`
'unicorn/prefer-string-starts-ends-with': ERROR,
// prefer `String#{ trimStart, trimEnd }()` over `String#{ trimLeft, trimRight }()`
'unicorn/prefer-string-trim-start-end': ERROR,
// prefer `switch` over multiple `else-if`
'unicorn/prefer-switch': [ERROR, { minimumCases: 3 }],
// enforce consistent relative `URL` style
'unicorn/relative-url-style': [ERROR, ALWAYS],
// enforce using the separator argument with `Array#join()`
'unicorn/require-array-join-separator': ERROR,
// enforce using the digits argument with `Number#toFixed()`
'unicorn/require-number-to-fixed-digits-argument': ERROR,
// enforce using the `targetOrigin`` argument with `window.postMessage()`
'unicorn/require-post-message-target-origin': ERROR,
// forbid braces for case clauses
'unicorn/switch-case-braces': [ERROR, 'avoid'],
// fix whitespace-insensitive template indentation
'unicorn/template-indent': OFF, // waiting for `String.dedent`
// enforce consistent case for text encoding identifiers
'unicorn/text-encoding-identifier-case': ERROR,
// require `new` when throwing an error
'unicorn/throw-new-error': ERROR,
// sonarjs
// alternatives in regular expressions should be grouped when used with anchors
'sonarjs/anchor-precedence': ERROR,
// arguments to built-in functions should match documented types
'sonarjs/argument-type': OFF, // it seems does not work
// bitwise operators should not be used in boolean contexts
'sonarjs/bitwise-operators': ERROR,
// function call arguments should not start on new lines
'sonarjs/call-argument-line': ERROR,
// class names should comply with a naming convention
'sonarjs/class-name': [ERROR, { format: '^[A-Z$][a-zA-Z0-9]*$' }],
// comma and logical `OR` operators should not be used in switch cases
'sonarjs/comma-or-logical-or-case': ERROR,
// cyclomatic complexity of functions should not be too high
'sonarjs/cyclomatic-complexity': [OFF, { threshold: 16 }],
// expressions should not be too complex
'sonarjs/expression-complexity': [OFF, { max: 3 }],
// `in` should not be used with primitive types
'sonarjs/in-operator-type-error': ERROR,
// functions should be called consistently with or without `new`
'sonarjs/inconsistent-function-call': ERROR,
// `new` should only be used with functions and classes
'sonarjs/new-operator-misuse': [ERROR, { considerJSDoc: false }],
// `Array#{ sort, toSorted }` should use a compare function
'sonarjs/no-alphabetical-sort': ERROR,
// `delete` should not be used on arrays
'sonarjs/no-array-delete': ERROR,
// array indexes should be numeric
'sonarjs/no-associative-arrays': ERROR,
// `switch` statements should not contain non-case labels
'sonarjs/no-case-label-in-switch': ERROR,
// collection sizes and array length comparisons should make sense
'sonarjs/no-collection-size-mischeck': ERROR,
// two branches in a conditional structure should not have exactly the same implementation
'sonarjs/no-duplicated-branches': ERROR,
// collection elements should not be replaced unconditionally
'sonarjs/no-element-overwrite': ERROR,
// empty collections should not be accessed or iterated
'sonarjs/no-empty-collection': ERROR,
// function calls should not pass extra arguments
'sonarjs/no-extra-arguments': ERROR,
// `for-in` should not be used with iterables
'sonarjs/no-for-in-iterable': ERROR,
// global `this` object should not be used
'sonarjs/no-global-this': ERROR,
// boolean expressions should not be gratuitous
'sonarjs/no-gratuitous-expressions': ERROR,
// `in` should not be used on arrays
'sonarjs/no-in-misuse': ERROR,
// strings and non-strings should not be added
'sonarjs/no-incorrect-string-concat': ERROR,
// `await` should only be used with promises
'sonarjs/no-invalid-await': ERROR,
// function returns should not be invariant
'sonarjs/no-invariant-returns': ERROR,
// literals should not be used as functions
'sonarjs/no-literal-call': ERROR,
// array-mutating methods should not be used misleadingly
'sonarjs/no-misleading-array-reverse': ERROR,
// assignments should not be redundant
'sonarjs/no-redundant-assignments': ERROR,
// boolean literals should not be redundant
'sonarjs/no-redundant-boolean': ERROR,
// jump statements should not be redundant
'sonarjs/no-redundant-jump': ERROR,
// redundant pairs of parentheses should be removed
'sonarjs/no-redundant-parentheses': ERROR,
// variables should be defined before being used
'sonarjs/no-reference-error': ERROR,
// conditionals should start on new lines
'sonarjs/no-same-line-conditional': ERROR,
// `switch` statements should have at least 3 `case` clauses
'sonarjs/no-small-switch': ERROR,
// promise rejections should not be caught by `try` blocks
'sonarjs/no-try-promise': ERROR,
// `undefined` should not be passed as the value of optional parameters
'sonarjs/no-undefined-argument': ERROR,
// errors should not be created without being thrown
'sonarjs/no-unthrown-error': ERROR,
// collection and array contents should be used
'sonarjs/no-unused-collection': ERROR,
// the output of functions that don't return anything should not be used
'sonarjs/no-use-of-empty-return-value': ERROR,
// values should not be uselessly incremented
'sonarjs/no-useless-increment': ERROR,
// non-existent operators `=+`, `=-` and `=!` should not be used
'sonarjs/non-existent-operator': ERROR,
// properties of variables with `null` or `undefined` values should not be accessed
'sonarjs/null-dereference': ERROR, // it seems does not work
// arithmetic operations should not result in `NaN`
'sonarjs/operation-returning-nan': ERROR,
// local variables should not be declared and then immediately returned or thrown
'sonarjs/prefer-immediate-return': ERROR,
// object literal syntax should be used
'sonarjs/prefer-object-literal': ERROR,
// shorthand promises should be used
'sonarjs/prefer-promise-shorthand': ERROR,
// return of boolean expressions should not be wrapped into an `if-then-else` statement
'sonarjs/prefer-single-boolean-return': ERROR,
// a `while` loop should be used instead of a `for` loop with condition only
'sonarjs/prefer-while': ERROR,
// using slow regular expressions is security-sensitive
'sonarjs/slow-regex': ERROR,
// regular expressions with the global flag should be used with caution
'sonarjs/stateful-regex': ERROR,
// comparison operators should not be used with strings
'sonarjs/strings-comparison': ERROR,
// `super()` should be invoked appropriately
'sonarjs/super-invocation': ERROR,
// results of operations on strings should not be ignored
'sonarjs/useless-string-operation': ERROR,
// values not convertible to numbers should not be used in numeric comparisons
'sonarjs/values-not-convertible-to-numbers': ERROR,
// regexp
// disallow confusing quantifiers
'regexp/confusing-quantifier': ERROR,
// enforce consistent escaping of control characters
'regexp/control-character-escape': ERROR,
// enforce single grapheme in string literal
'regexp/grapheme-string-literal': ERROR,
// enforce consistent usage of hexadecimal escape
'regexp/hexadecimal-escape': [ERROR, NEVER],
// enforce into your favorite case
'regexp/letter-case': [ERROR, {
caseInsensitive: 'lowercase',
unicodeEscape: 'uppercase',
}],
// enforce match any character style
'regexp/match-any': [ERROR, { allows: ['[\\S\\s]', 'dotAll'] }],
// enforce use of escapes on negation
'regexp/negation': ERROR,
// disallow elements that contradict assertions
'regexp/no-contradiction-with-assertion': ERROR,
// disallow control characters
'regexp/no-control-character': ERROR,
// disallow duplicate characters in the RegExp character class
'regexp/no-dupe-characters-character-class': ERROR,
// disallow duplicate disjunctions
'regexp/no-dupe-disjunctions': [ERROR, { report: 'all' }],
// disallow alternatives without elements
'regexp/no-empty-alternative': ERROR,
// disallow capturing group that captures empty
'regexp/no-empty-capturing-group': ERROR,
// disallow character classes that match no characters
'regexp/no-empty-character-class': ERROR,
// disallow empty group
'regexp/no-empty-group': ERROR,
// disallow empty lookahead assertion or empty lookbehind assertion
'regexp/no-empty-lookarounds-assertion': ERROR,
// reports empty string literals in character classes
'regexp/no-empty-string-literal': ERROR,
// disallow escape backspace `([\b])`
'regexp/no-escape-backspace': ERROR,
// disallow unnecessary nested lookaround assertions
'regexp/no-extra-lookaround-assertions': ERROR,
// disallow invalid regular expression strings in RegExp constructors
'regexp/no-invalid-regexp': ERROR,
// disallow invisible raw character
'regexp/no-invisible-character': ERROR,
// disallow lazy quantifiers at the end of an expression
'regexp/no-lazy-ends': ERROR,
// disallow legacy RegExp features
'regexp/no-legacy-features': ERROR,
// disallow capturing groups that do not behave as one would expect
'regexp/no-misleading-capturing-group': ERROR,
// disallow multi-code-point characters in character classes and quantifiers
'regexp/no-misleading-unicode-character': ERROR,
// disallow missing `g` flag in patterns used in `String#matchAll` and `String#replaceAll`
'regexp/no-missing-g-flag': ERROR,
// disallow non-standard flags
'regexp/no-non-standard-flag': ERROR,
// disallow obscure character ranges
'regexp/no-obscure-range': ERROR,
// disallow octal escape sequence
'regexp/no-octal': ERROR,
// disallow optional assertions
'regexp/no-optional-assertion': ERROR,
// disallow backreferences that reference a group that might not be matched
'regexp/no-potentially-useless-backreference': ERROR,
// disallow standalone backslashes
'regexp/no-standalone-backslash': ERROR,
// disallow trivially nested assertions
'regexp/no-trivially-nested-assertion': ERROR,
// disallow nested quantifiers that can be rewritten as one quantifier
'regexp/no-trivially-nested-quantifier': ERROR,
// disallow unused capturing group
'regexp/no-unused-capturing-group': ERROR,
// disallow assertions that are known to always accept (or reject)
'regexp/no-useless-assertions': ERROR,
// disallow useless backreferences in regular expressions
'regexp/no-useless-backreference': ERROR,
// disallow character class with one character
'regexp/no-useless-character-class': ERROR,
// disallow useless `$` replacements in replacement string
'regexp/no-useless-dollar-replacements': ERROR,
// disallow unnecessary string escaping
'regexp/no-useless-escape': ERROR,
// disallow unnecessary regex flags
'regexp/no-useless-flag': ERROR,
// disallow unnecessarily non-greedy quantifiers
'regexp/no-useless-lazy': ERROR,
// disallow unnecessary non-capturing group
'regexp/no-useless-non-capturing-group': ERROR,
// disallow quantifiers that can be removed
'regexp/no-useless-quantifier': ERROR,
// disallow unnecessary range of characters by using a hyphen
'regexp/no-useless-range': ERROR,
// reports any unnecessary set operands
'regexp/no-useless-set-operand': ERROR,
// reports the string alternatives of a single character in `\q{...}`, it can be placed outside `\q{...}`
'regexp/no-useless-string-literal': ERROR,
// disallow unnecessary `{n,m}`` quantifier
'regexp/no-useless-two-nums-quantifier': ERROR,
// disallow quantifiers with a maximum of zero
'regexp/no-zero-quantifier': ERROR,
// disallow the alternatives of lookarounds that end with a non-constant quantifier
'regexp/optimal-lookaround-quantifier': ERROR,
// require optimal quantifiers for concatenated quantifiers
'regexp/optimal-quantifier-concatenation': ERROR,
// enforce using character class
'regexp/prefer-character-class': ERROR,
// enforce using `\d`
'regexp/prefer-d': ERROR,
// enforces escape of replacement `$` character (`$$`)
'regexp/prefer-escape-replacement-dollar-char': ERROR,
// prefer lookarounds over capturing group that do not replace
'regexp/prefer-lookaround': [ERROR, { lookbehind: true, strictTypes: true }],
// enforce using named backreferences
'regexp/prefer-named-backreference': ERROR,
// enforce using named capture group in regular expression
'regexp/prefer-named-capture-group': ERROR,
// enforce using named replacement
'regexp/prefer-named-replacement': ERROR,
// enforce using `+` quantifier
'regexp/prefer-plus-quantifier': ERROR,
// prefer predefined assertion over equivalent lookarounds
'regexp/prefer-predefined-assertion': ERROR,
// enforce using quantifier
'regexp/prefer-quantifier': ERROR,
// enforce using `?` quantifier
'regexp/prefer-question-quantifier': ERROR,
// enforce using character class range
'regexp/prefer-range': [ERROR, { target: 'alphanumeric' }],
// enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided
'regexp/prefer-regexp-exec': ERROR,
// enforce that `RegExp#test` is used instead of `String#match` and `RegExp#exec`
'regexp/prefer-regexp-test': ERROR,
// enforce using result array `.groups``
'regexp/prefer-result-array-groups': ERROR,
// enforce using `*` quantifier
'regexp/prefer-star-quantifier': ERROR,
// enforce use of unicode codepoint escapes
'regexp/prefer-unicode-codepoint-escapes': ERROR,
// enforce using `\w`
'regexp/prefer-w': ERROR,
// aims to optimize patterns by simplifying set operations in character classes (with v flag)
'regexp/simplify-set-operations': ERROR,
// sort alternatives if order doesn't matter
'regexp/sort-alternatives': ERROR,
// enforces elements order in character class
'regexp/sort-character-class-elements': ERROR,
// require regex flags to be sorted
'regexp/sort-flags': ERROR,
// disallow not strictly valid regular expressions
'regexp/strict': ERROR,
// enforce consistent usage of unicode escape or unicode codepoint escape
'regexp/unicode-escape': ERROR,
// use the `i` flag if it simplifies the pattern
'regexp/use-ignore-case': ERROR,
// ReDoS vulnerability check
'redos/no-vulnerable': [ERROR, { timeout: 1e3, cache: { strategy: 'aggressive' } }],
// disallow function declarations in if statement clauses without using blocks
'es/no-function-declarations-in-if-statement-clauses-without-block': ERROR,
// disallow initializers in for-in heads
'es/no-initializers-in-for-in': ERROR,
// disallow \u2028 and \u2029 in string literals
'es/no-json-superset': ERROR,
// disallow labelled function declarations
'es/no-labelled-function-declarations': ERROR,
// disallow the `RegExp.prototype.compile` method
'es/no-regexp-prototype-compile': ERROR,
// eslint-comments:
// disallow duplicate `eslint-disable` comments
'eslint-comments/no-duplicate-disable': ERROR,
// disallow `eslint-disable` comments without rule names
'eslint-comments/no-unlimited-disable': ERROR,
// disallow unused `eslint-disable` comments
// it's clearly disabled since result of some rules (like `redos/no-vulnerable`) is non-deterministic
// and anyway it's reported because of `reportUnusedDisableDirectives` option
'eslint-comments/no-unused-disable': OFF,
// disallow unused `eslint-enable` comments