-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Expand file tree
/
Copy path.oxlintrc.json
More file actions
1941 lines (1924 loc) · 115 KB
/
Copy path.oxlintrc.json
File metadata and controls
1941 lines (1924 loc) · 115 KB
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
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"options": {
"typeAware": true,
"reportUnusedDisableDirectives": "error"
},
"plugins": [
"eslint",
"import",
// "jsdoc",
// "jest",
"jsx-a11y",
// "nextjs",
"node",
"oxc",
"promise",
"react",
"react-perf",
"typescript",
"unicorn"
// "vitest",
// "vue"
],
"jsPlugins": ["./.oxlint/plugin.mjs"],
"categories": {
"correctness": "warn",
"nursery": "warn",
"pedantic": "warn",
"perf": "warn",
"restriction": "warn",
"style": "warn",
"suspicious": "warn"
},
"rules": {
// ------------------------------------------------------------------------
// Local Rules
// ------------------------------------------------------------------------
// [local] (🛠️ autofix)
"signal-desktop/enforce-array-buffer": "error",
// [local]
"signal-desktop/enforce-file-suffix": "error",
// [local] (🛠️ autofix)
"signal-desktop/enforce-license-comments": "error",
// [local]
"signal-desktop/enforce-tw": "error",
// [local]
"signal-desktop/enforce-type-alias-readonlydeep": "off", // [reason: Only enabled in specific files]
// [local] (💡 suggestion)
"signal-desktop/no-disabled-tests": "error",
// [local]
"signal-desktop/no-extraneous-dependencies": "error",
// [local] (🛠️ autofix)
"signal-desktop/no-focused-tests": "error",
// [local]
"signal-desktop/no-for-in": "error",
"signal-desktop/no-restricted-paths": [
"error",
{
"zones": [
{
"target": ["ts/util/**", "ts/types/**"],
"from": ["ts/components/**", "ts/axo/**/*.dom.*"],
"message": "Importing components is forbidden from ts/{util,types}"
},
{
"target": ["scripts/**", "codemods/**"],
"from": ["ts/**"],
"message": "Scripts should not import from ts/**"
},
{
"target": ["ts/**"],
"from": ["scripts/**", "codemods/**"],
"message": "App should not import from scripts"
}
]
}
],
// [local]
"signal-desktop/no-then": "error",
// ------------------------------------------------------------------------
// Category: Correctness
// ------------------------------------------------------------------------
// [correctness] (✅ recommended) Require super() calls in constructors
"eslint/constructor-super": "error",
// [correctness] (✅ recommended) (⚠️ 🛠️ dangerous autofix) Enforce for loop update clause moving the counter in the right direction
"eslint/for-direction": "error",
// [correctness] (✅ recommended) Disallow using an async function as a Promise executor
"eslint/no-async-promise-executor": "error",
// [correctness] (✅ recommended) Disallow the use of arguments.caller or arguments.callee
"eslint/no-caller": "error",
// [correctness] (✅ recommended) Disallow reassigning class members
"eslint/no-class-assign": "error",
// [correctness] (✅ recommended) (🛠️ autofix) (💡 suggestion) Disallow comparing against -0
"eslint/no-compare-neg-zero": "error",
// [correctness] (✅ recommended) Disallow assignment operators in conditional expressions
"eslint/no-cond-assign": ["error", "always"],
// [correctness] (✅ recommended) Disallow reassigning const, using, and await using variables
"eslint/no-const-assign": "error",
// [correctness] (✅ recommended) Disallow expressions where the operation doesn't affect the value
"eslint/no-constant-binary-expression": "off",
// [correctness] (✅ recommended) Disallow constant expressions in conditions
"eslint/no-constant-condition": [
"error",
{
"checkLoops": "all"
}
],
// [correctness] (✅ recommended) Disallow control characters in regular expressions
"eslint/no-control-regex": "off",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow the use of debugger
"eslint/no-debugger": "error",
// [correctness] (✅ recommended) Disallow deleting variables
"eslint/no-delete-var": "error",
// [correctness] (✅ recommended) Disallow duplicate class members
"eslint/no-dupe-class-members": "error",
// [correctness] (✅ recommended) Disallow duplicate conditions in if-else-if chains
"eslint/no-dupe-else-if": "error",
// [correctness] (✅ recommended) Disallow duplicate keys in object literals
"eslint/no-dupe-keys": "error",
// [correctness] (✅ recommended) Disallow duplicate case labels
"eslint/no-duplicate-case": "error",
// [correctness] (✅ recommended) Disallow empty character classes in regular expressions
"eslint/no-empty-character-class": "error",
// [correctness] (✅ recommended) Disallow empty destructuring patterns
"eslint/no-empty-pattern": "error",
// [correctness] (✅ recommended) (💡 suggestion) Disallow empty static blocks
"eslint/no-empty-static-block": "error",
// [correctness] (✅ recommended) Disallow the use of eval()
"eslint/no-eval": "error",
// [correctness] (✅ recommended) Disallow reassigning exceptions in catch clauses
"eslint/no-ex-assign": "error",
// [correctness] (✅ recommended) (🛠️ autofix) (💡 suggestion) Disallow unnecessary boolean casts
"eslint/no-extra-boolean-cast": "error",
// [correctness] (✅ recommended) Disallow reassigning function declarations
"eslint/no-func-assign": "error",
// [correctness] (✅ recommended) Disallow assignments to native objects or read-only global variables
"eslint/no-global-assign": "error",
// [correctness] (✅ recommended) Disallow assigning to imported bindings
"eslint/no-import-assign": "error",
// [correctness] (✅ recommended) Disallow invalid regular expression strings in RegExp constructors
"eslint/no-invalid-regexp": "error",
// [correctness] (✅ recommended) Disallow irregular whitespace
"eslint/no-irregular-whitespace": "error",
// [correctness] (✅ recommended) (💡 suggestion) Disallow the use of the __iterator__ property
"eslint/no-iterator": "error",
// [correctness] (✅ recommended) Disallow literal numbers that lose precision
"eslint/no-loss-of-precision": "error",
// [correctness] (✅ recommended) (🚧 planned autofix) Disallow characters which are made with multiple code points in character class syntax
"eslint/no-misleading-character-class": "error",
// [correctness] (✅ recommended) Disallow new operators with global non-constructor functions
"eslint/no-new-native-nonconstructor": "error",
// [correctness] (✅ recommended) (💡 suggestion) Disallow \8 and \9 escape sequences in string literals
"eslint/no-nonoctal-decimal-escape": "error",
// [correctness] (✅ recommended) Disallow calling global object properties as functions
"eslint/no-obj-calls": "error",
// [correctness] (✅ recommended) Disallow assignments where both sides are exactly the same
"eslint/no-self-assign": "error",
// [correctness] (✅ recommended) Disallow returning values from setters
"eslint/no-setter-return": "error",
// [correctness] (✅ recommended) Disallow identifiers from shadowing restricted names
"eslint/no-shadow-restricted-names": "error",
// [correctness] (✅ recommended) Disallow sparse arrays
"eslint/no-sparse-arrays": "error",
// [correctness] (✅ recommended) Disallow this/super before calling super() in constructors
"eslint/no-this-before-super": "error",
// [correctness] (✅ recommended) Disallow let or var variables that are read but never assigned
"eslint/no-unassigned-vars": "error",
// [correctness] (✅ recommended) Disallow control flow statements in finally blocks
"eslint/no-unsafe-finally": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow negating the left operand of relational operators
"eslint/no-unsafe-negation": "error",
// [correctness] (✅ recommended) Disallow use of optional chaining in contexts where the undefined value is not allowed
"eslint/no-unsafe-optional-chaining": "error",
// [correctness] (✅ recommended) Disallow unused expressions
"eslint/no-unused-expressions": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow unused labels
"eslint/no-unused-labels": "error",
// [correctness] (✅ recommended) Disallow unused private class members
"eslint/no-unused-private-class-members": "off",
// [correctness] (✅ recommended) ⚠️ 🛠 (💡 suggestion) Disallow unused variables
"eslint/no-unused-vars": [
"error", // [reason: FILLMEIN]
{ "argsIgnorePattern": "^_", "caughtErrors": "none" }
],
// [correctness] (✅ recommended) Disallow useless backreferences in regular expressions
"eslint/no-useless-backreference": "error",
// [correctness] (✅ recommended) Disallow unnecessary catch clauses
"eslint/no-useless-catch": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow unnecessary escape characters
"eslint/no-useless-escape": "off",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow renaming import, export, and destructured assignments to the same name
"eslint/no-useless-rename": "error",
// [correctness] (✅ recommended) Disallow with statements
"eslint/no-with": "error",
// [correctness] (✅ recommended) Require generator functions to contain yield
"eslint/require-yield": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Require calls to isNaN() when checking for NaN
"eslint/use-isnan": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Enforce comparing typeof expressions against valid strings
"eslint/valid-typeof": [
"error",
{
"requireStringLiterals": true
}
],
// [correctness] Ensure a default export is present, given a default import.
"import/default": "error",
// [correctness] Ensure imported namespaces contain dereferenced properties as they are dereferenced.
"import/namespace": "error",
// [correctness] Enforce assertion to be made in a test body
// "jest/expect-expect": "error",
// [correctness] Disallow calling expect conditionally
// "jest/no-conditional-expect": "error",
// [correctness] Disallow disabled tests
// "jest/no-disabled-tests": "error",
// [correctness] Disallow using exports in files containing tests
// "jest/no-export": "error",
// [correctness] (🛠️ autofix) Disallow focused tests
// "jest/no-focused-tests": "error",
// [correctness] Disallow using expect outside of it or test blocks
// "jest/no-standalone-expect": "error",
// [correctness] Require a message for toThrow()
// "jest/require-to-throw-message": "error",
// [correctness] Enforce valid describe() callback
// "jest/valid-describe-callback": "error",
// [correctness] (🚧 planned autofix) Enforce valid expect() usage
// "jest/valid-expect": "error",
// [correctness] (🛠️ autofix) Enforce valid titles
// "jest/valid-title": "error",
// [correctness] (🚧 planned autofix) Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots.
// "jsdoc/check-property-names": "error",
// [correctness] (🚧 planned autofix) Reports invalid block tag names.
// "jsdoc/check-tag-names": "error",
// [correctness] Prohibits use of @implements on non-constructor functions (to enforce the tag only being used on classes/constructors).
// "jsdoc/implements-on-classes": "error",
// [correctness] (🚧 planned autofix) This rule reports defaults being used on the relevant portion of @param or @default.
// "jsdoc/no-defaults": "error",
// [correctness] (🚧 planned autofix) Requires that all @typedef and @namespace tags have @property when their type is a plain object, Object, or PlainObject.
// "jsdoc/require-property": "error",
// [correctness] Requires that each @property tag has a description value.
// "jsdoc/require-property-description": "error",
// [correctness] Requires that all @property tags have names.
// "jsdoc/require-property-name": "error",
// [correctness] Requires that each @property tag has a type value (in curly brackets).
// "jsdoc/require-property-type": "error",
// [correctness] Requires yields are documented with @yields tags.
// "jsdoc/require-yields": "error",
// [correctness] Enforce all elements that require alternative text have meaningful information to relay back to end user.
"jsx-a11y/alt-text": "error",
// [correctness] (💡 suggestion) Enforce all anchors to contain accessible content.
"jsx-a11y/anchor-has-content": "error",
// [correctness] Enforce all anchors are valid, navigable elements.
"jsx-a11y/anchor-is-valid": "error",
// [correctness] Enforce elements with aria-activedescendant are tabbable.
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
// [correctness] (🛠️ autofix) Enforce all aria-* props are valid.
"jsx-a11y/aria-props": "error",
// [correctness] Enforce ARIA state and property values are valid.
"jsx-a11y/aria-proptypes": "off",
// [correctness] Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
"jsx-a11y/aria-role": "error",
// [correctness] (🛠️ autofix) Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
"jsx-a11y/aria-unsupported-elements": "error",
// [correctness] Enforce that autocomplete attributes are used correctly.
"jsx-a11y/autocomplete-valid": "error",
// [correctness] Enforce a clickable non-interactive element has at least one keyboard event listener.
"jsx-a11y/click-events-have-key-events": "error",
// [correctness] Enforce that a control (an interactive element) has a text label.
"jsx-a11y/control-has-associated-label": [
"error",
{
"depth": 3,
"ignoreRoles": ["separator"]
}
],
// [correctness] Enforce heading (h1, h2, etc) elements contain accessible content.
"jsx-a11y/heading-has-content": "error",
// [correctness] Enforce <html> element has lang prop.
"jsx-a11y/html-has-lang": "error",
// [correctness] Enforce iframe elements have a title attribute.
"jsx-a11y/iframe-has-title": "error",
// [correctness] Enforce <img> alt prop does not contain the word "image", "picture", or "photo".
"jsx-a11y/img-redundant-alt": "error",
// [correctness] (💡 suggestion) Elements with an interactive role and interaction handlers (mouse or key press) must be focusable.
"jsx-a11y/interactive-supports-focus": "error",
// [correctness] Enforce that a label tag has a text label and an associated control.
"jsx-a11y/label-has-associated-control": "error",
// [correctness] Enforce lang attribute has a valid value.
"jsx-a11y/lang": "error",
// [correctness] Enforces that <audio> and <video> elements must have a <track> for captions.
"jsx-a11y/media-has-caption": "off", // [reason: Cannot caption user-generated audio or video content]
// [correctness] Enforce that onMouseOver/onMouseOut are accompanied by onFocus/onBlur for keyboard-only users.
"jsx-a11y/mouse-events-have-key-events": "error",
// [correctness] (💡 suggestion) Enforce that the accessKey prop is not used on any element to avoid complications with keyboard commands used by a screen reader.
"jsx-a11y/no-access-key": "error",
// [correctness] (🛠️ autofix) Disallow aria-hidden="true" from being set on focusable elements.
"jsx-a11y/no-aria-hidden-on-focusable": "error",
// [correctness] (💡 suggestion) Enforce autoFocus prop is not used.
"jsx-a11y/no-autofocus": "off",
// [correctness] Enforce distracting elements are not used.
"jsx-a11y/no-distracting-elements": "error",
// [correctness] Non-interactive elements should not be assigned mouse or keyboard event listeners.
"jsx-a11y/no-noninteractive-element-interactions": "error",
// [correctness] tabIndex should only be declared on interactive elements.
"jsx-a11y/no-noninteractive-tabindex": "off",
// [correctness] (🛠️ autofix) Enforce explicit role property is not the same as implicit/default role property on element.
"jsx-a11y/no-redundant-roles": "off",
// [correctness] Enforce that non-interactive, visible elements (such as <div>) that have click handlers use the role attribute.
"jsx-a11y/no-static-element-interactions": "error",
// [correctness] Enforces using semantic DOM elements over the ARIA role property.
"jsx-a11y/prefer-tag-over-role": "off",
// [correctness] Enforce that elements with ARIA roles must have all required attributes for that role.
"jsx-a11y/role-has-required-aria-props": "off",
// [correctness] Enforce that elements with explicit or implicit roles defined contain only aria-* properties supported by that role.
"jsx-a11y/role-supports-aria-props": "error",
// [correctness] (🛠️ autofix) Enforce scope prop is only used on <th> elements.
"jsx-a11y/scope": "error",
// [correctness] (⚠️ 💡 dangerous suggestion) Enforce tabIndex value is not greater than zero.
"jsx-a11y/tabindex-no-positive": "error",
// [correctness] Enforce font-display behavior with Google Fonts.
// "nextjs/google-font-display": "error",
// [correctness] Ensure preconnect is used with Google Fonts.
// "nextjs/google-font-preconnect": "error",
// [correctness] Enforce id attribute on next/script components with inline content.
// "nextjs/inline-script-id": "error",
// [correctness] Prefer next/script component when using the inline script for Google Analytics.
// "nextjs/next-script-for-ga": "error",
// [correctness] Prevent assignment to the module variable.
// "nextjs/no-assign-module-variable": "error",
// [correctness] Prevent Client Components from being async functions.
// "nextjs/no-async-client-component": "error",
// [correctness] Prevent usage of next/script's beforeInteractive strategy outside of pages/_document.js.
// "nextjs/no-before-interactive-script-outside-document": "error",
// [correctness] Prevent manual stylesheet tags.
// "nextjs/no-css-tags": "error",
// [correctness] Prevent importing next/document outside of pages/_document.js.
// "nextjs/no-document-import-in-page": "error",
// [correctness] Prevent duplicate usage of <Head> in pages/_document.js.
// "nextjs/no-duplicate-head": "error",
// [correctness] Prevent usage of <head> element.
// "nextjs/no-head-element": "error",
// [correctness] Prevent usage of next/head in pages/_document.js.
// "nextjs/no-head-import-in-document": "error",
// [correctness] Prevent usage of <a> elements to navigate to internal Next.js pages.
// "nextjs/no-html-link-for-pages": "error",
// [correctness] (🚧 planned autofix) Prevent usage of <img> element due to slower LCP and higher bandwidth.
// "nextjs/no-img-element": "error",
// [correctness] Prevent page-only custom fonts.
// "nextjs/no-page-custom-font": "error",
// [correctness] Prevent usage of next/script in next/head component.
// "nextjs/no-script-component-in-head": "error",
// [correctness] Prevent usage of styled-jsx in pages/_document.js.
// "nextjs/no-styled-jsx-in-document": "error",
// [correctness] Prevent synchronous scripts.
// "nextjs/no-sync-scripts": "error",
// [correctness] Prevent usage of <title> with Head component from next/document.
// "nextjs/no-title-in-document-head": "error",
// [correctness] (🚧 planned autofix) Prevent common typos in Next.js's data fetching functions
// "nextjs/no-typos": "error",
// [correctness] Prevent duplicate polyfills from Polyfill.io.
// "nextjs/no-unwanted-polyfillio": "error",
// [correctness] (✅ recommended) Disallow array method called on arguments.
"oxc/bad-array-method-on-arguments": "error",
// [correctness] (✅ recommended) This rule warns when the return value of the charAt method is used to compare a string of length greater than 1.
"oxc/bad-char-at-comparison": "error",
// [correctness] (✅ recommended) This rule applies when the comparison operator is applied two or more times in a row.
"oxc/bad-comparison-sequence": "error",
// [correctness] (✅ recommended) Checks whether the clamp function Math.min(Math.max(x, y), z) always evaluate to a constant result because the arguments are in the wrong order.
"oxc/bad-min-max-func": "error",
// [correctness] (✅ recommended) Checks for comparisons between object and array literals.
"oxc/bad-object-literal-comparison": "error",
// [correctness] (✅ recommended) This rule warns when the replaceAll method is called with a regular expression that does not have the global flag (g).
"oxc/bad-replace-all-arg": "error",
// [correctness] (✅ recommended) Checks for redundant or logically impossible comparisons.
"oxc/const-comparisons": "error",
// [correctness] (✅ recommended) (🛠️ autofix) This rule checks for double comparisons in logical expressions.
"oxc/double-comparisons": "error",
// [correctness] (✅ recommended) (⚠️ 🛠️ dangerous autofix) Checks for erasing operations, e.g., x * 0.
"oxc/erasing-op": "error",
// [correctness] (✅ recommended) (💡 suggestion) Checks whether the throw keyword is missing in front of a new expression.
"oxc/missing-throw": "error",
// [correctness] (✅ recommended) Checks whether the radix or precision arguments of number-related functions exceeds the limit.
"oxc/number-arg-out-of-range": "error",
// [correctness] (✅ recommended) (⚠️ 🛠️ dangerous autofix) Checks for arguments that are only used in recursion with no side-effects.
"oxc/only-used-in-recursion": "error",
// [correctness] (✅ recommended) This rule applies when an Array function has a callback argument used for an array with empty slots.
"oxc/uninvoked-array-callback": "error",
// [correctness] Disallow calling cb() inside of a then() (use util.callbackify instead).
"promise/no-callback-in-promise": "error",
// [correctness] (🛠️ autofix) Disallow calling new on a Promise static method.
"promise/no-new-statics": "error",
// [correctness] Enforces the proper number of arguments are passed to Promise functions.
"promise/valid-params": "error",
// [correctness] ⚠️ 🛠 (💡 suggestion) Verifies the list of dependencies for Hooks like useEffect and similar.
"react/exhaustive-deps": [
"error",
{ "additionalHooks": "^(useSpring|useSprings)$" }
],
// [correctness] (💡 suggestion) Require all forwardRef components include a ref parameter
"react/forward-ref-uses-ref": "error",
// [correctness] Disallow missing key props in iterators/collection literals
"react/jsx-key": "off",
// [correctness] Disallow duplicate properties in JSX
"react/jsx-no-duplicate-props": "error",
// [correctness] Disallow undeclared variables in JSX
"react/jsx-no-undef": "error",
// [correctness] (🛠️ autofix) Disallow JSX prop spreading the same identifier multiple times
"react/jsx-props-no-spread-multi": "error",
// [correctness] Disallow passing of children as props
"react/no-children-prop": "error",
// [correctness] Disallow when a DOM element is using both children and dangerouslySetInnerHTML
"react/no-danger-with-children": "error",
// [correctness] Disallow usage of setState in componentDidMount
"react/no-did-mount-set-state": "off",
// [correctness] Disallow usage of setState in componentDidUpdate.
"react/no-did-update-set-state": "off", // DECIDEME (errors: 1)
// [correctness] Disallow direct mutation of this.state
"react/no-direct-mutation-state": "error",
// [correctness] Disallow usage of findDOMNode
"react/no-find-dom-node": "error",
// [correctness] Disallow usage of isMounted
"react/no-is-mounted": "error",
// [correctness] Disallow usage of the return value of ReactDOM.render
"react/no-render-return-value": "error",
// [correctness] Disallow using string references
"react/no-string-refs": "error",
// [correctness] Disallow this from being used in stateless functional components
"react/no-this-in-sfc": "error",
// [correctness] Disallow usage of unsafe lifecycle methods
"react/no-unsafe": "error",
// [correctness] Disallow usage of setState in componentWillUpdate
"react/no-will-update-set-state": "error",
// [correctness] Disallow void DOM elements (e.g. <img />, <br />) from receiving children
"react/void-dom-elements-no-children": "error",
// [correctness] (✅ recommended) (💡 suggestion) (💭 needs type info)
"typescript/await-thenable": "error",
// [correctness] (✅ recommended) (💡 suggestion) (💭 needs type info) Disallow using the delete operator on array values
"typescript/no-array-delete": "error",
// [correctness] (✅ recommended) (💭 needs type info) Require .toString() and .toLocaleString() to only be called on objects which provide useful information when stringified
"typescript/no-base-to-string": "error",
// [correctness] (✅ recommended) Disallow duplicate enum member values
"typescript/no-duplicate-enum-values": "error",
// [correctness] (✅ recommended) (🛠️ autofix) (💭 needs type info) Disallow duplicate constituents of union or intersection types
"typescript/no-duplicate-type-constituents": "error",
// [correctness] (✅ recommended) (🚧 planned autofix) Disallow extra non-null assertions
"typescript/no-extra-non-null-assertion": "error",
// [correctness] (✅ recommended) (💡 suggestion) (💭 needs type info) Require Promise-like statements to be handled appropriately
"typescript/no-floating-promises": "error",
// [correctness] (✅ recommended) (💭 needs type info) Disallow iterating over an array with a for-in loop
"typescript/no-for-in-array": "error",
// [correctness] (✅ recommended) (💭 needs type info) Disallow the use of eval()-like functions
"typescript/no-implied-eval": "error",
// [correctness] (✅ recommended) (🛠️ autofix) (💡 suggestion) (💭 needs type info) Disallow the void operator except when used to discard a value
"typescript/no-meaningless-void-operator": "error",
// [correctness] (✅ recommended) Enforce valid definition of new and constructor
"typescript/no-misused-new": "error",
// [correctness] (✅ recommended) (💡 suggestion) (💭 needs type info) Disallow using the spread operator when it might cause unexpected behavior
"typescript/no-misused-spread": "error",
// [correctness] (✅ recommended) (💡 suggestion) Disallow non-null assertions after an optional chain expression
"typescript/no-non-null-asserted-optional-chain": "error",
// [correctness] (✅ recommended) (💭 needs type info) Disallow members of unions and intersections that do nothing or override type information
"typescript/no-redundant-type-constituents": "error",
// [correctness] (✅ recommended) Disallow aliasing this
"typescript/no-this-alias": "error",
// [correctness] (✅ recommended) (💡 suggestion) Disallow unnecessary assignment of constructor property parameter
"typescript/no-unnecessary-parameter-property-assignment": "error",
// [correctness] (✅ recommended) Disallow unsafe declaration merging
"typescript/no-unsafe-declaration-merging": "error",
// [correctness] (✅ recommended) (💭 needs type info) Require unary negation to take a number
"typescript/no-unsafe-unary-minus": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow empty exports that don't change anything in a module file
"typescript/no-useless-empty-export": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow using confusing built-in primitive class wrappers
"typescript/no-wrapper-object-types": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Enforce the use of as const over literal type
"typescript/prefer-as-const": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Require using namespace keyword over module keyword to declare custom TypeScript modules
"typescript/prefer-namespace-keyword": "error",
// [correctness] (✅ recommended) (💭 needs type info) Require Array#sort and Array#toSorted calls to always provide a compareFunction
"typescript/require-array-sort-compare": "error",
// [correctness] (✅ recommended) (💭 needs type info) Enforce template literal expressions to be of string type
"typescript/restrict-template-expressions": [
"error",
{
"allowNever": true // FIXME
}
],
// [correctness] (✅ recommended) Disallow certain triple slash directives in favor of ES6-style import declarations
"typescript/triple-slash-reference": "error",
// [correctness] (✅ recommended) (💭 needs type info) Enforce unbound methods are called with their expected scope
"typescript/unbound-method": "off", // [reason: Issues with lodash, sinon, etc]
// [correctness] (✅ recommended) (💡 suggestion) Disallow using await in Promise method parameters.
"unicorn/no-await-in-promise-methods": "off",
// [correctness] (✅ recommended) Disallow empty files.
"unicorn/no-empty-file": "error",
// [correctness] (✅ recommended) Disallow invalid options in fetch() and new Request().
"unicorn/no-invalid-fetch-options": "error",
// [correctness] (✅ recommended) Prevent calling EventTarget#removeEventListener() with the result of an expression.
"unicorn/no-invalid-remove-event-listener": "error",
// [correctness] (✅ recommended) (🚧 planned autofix) Disallow new Array().
"unicorn/no-new-array": "off",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow passing single-element arrays to Promise methods.
"unicorn/no-single-promise-in-promise-methods": "error",
// [correctness] (✅ recommended) Disallow then property.
"unicorn/no-thenable": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow awaiting non-promise values.
"unicorn/no-unnecessary-await": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Disallow useless fallback when spreading in object literals.
"unicorn/no-useless-fallback-in-spread": "off",
// [correctness] (✅ recommended) (🚧 planned autofix) Disallow useless array length check.
"unicorn/no-useless-length-check": "off",
// [correctness] (✅ recommended) (⚠️ 🛠️ dangerous autofix) Disallow unnecessary spread.
"unicorn/no-useless-spread": "off",
// [correctness] (✅ recommended) (🛠️ autofix) Prefer using Set#size instead of Array#length.
"unicorn/prefer-set-size": "error",
// [correctness] (✅ recommended) (🛠️ autofix) Prefer String#startsWith() & String#endsWith() over RegExp#test().
"unicorn/prefer-string-starts-ends-with": "off",
// [correctness] Enforce using .each or .for consistently
// "vitest/consistent-each-for": "error",
// [correctness] (💡 suggestion) Enforce hoisted APIs to be on top of the file
// "vitest/hoisted-apis-on-top": "error",
// [correctness] Disallow conditional tests
// "vitest/no-conditional-tests": "error",
// [correctness] (🚧 planned autofix) Require local Test Context for concurrent snapshot tests
// "vitest/require-local-test-context-for-concurrent-snapshots": "error",
// [correctness] Disallow .todo usage
// "vitest/warn-todo": "error",
// [correctness] Disallow using arrow functions to define watcher
// "vue/no-arrow-functions-in-watch": "error",
// [correctness] (🛠️ autofix) Disallow using deprecated destroyed and beforeDestroy lifecycle hooks (in Vue.js 3.0.0+)
// "vue/no-deprecated-destroyed-lifecycle": "error",
// [correctness] Disallow export in <script setup>
// "vue/no-export-in-script-setup": "error",
// [correctness] Disallow asynchronously registered lifecycle hooks
// "vue/no-lifecycle-after-await": "error",
// [correctness] Disallow this usage in a beforeRouteEnter method
// "vue/no-this-in-before-route-enter": "error",
// [correctness] (🛠️ autofix) Enforce import from 'vue' instead of import from '@vue/*'
// "vue/prefer-import-from-vue": "error",
// [correctness] (🚧 planned autofix) Enforce valid defineEmits compiler macro
// "vue/valid-define-emits": "error",
// [correctness] (🚧 planned autofix) Enforce valid defineProps compiler macro
// "vue/valid-define-props": "error",
// ------------------------------------------------------------------------
// Category: Nursery
// ------------------------------------------------------------------------
// [nursery] Enforce return statements in getters
"eslint/getter-return": "error",
// [nursery] Disallow the use of undeclared variables unless mentioned in /*global */ comments
"eslint/no-undef": "error",
// [nursery] Disallow unreachable code after return, throw, continue, and break statements
"eslint/no-unreachable": "error", // [reason: Cannot enable `tsconfig.json#allowUnreachableCode` yet]
// [nursery] Disallow variable assignments when the value is not used
"eslint/no-useless-assignment": "off", // DECIDEME (errors: 28)
// [nursery] Forbid any invalid exports, i.e. re-export of the same name.
"import/export": "off",
// [nursery] Ensure named imports correspond to a named export in the remote file.
"import/named": "error",
// [nursery] Checks if the if and else blocks contain shared code that can be moved out of the blocks.
"oxc/branches-sharing-code": "off", // FIXME [reason: Seems useful for simple if-else, but don't like it pushing us to create nested if-else branches]
// [nursery] Disallow return statements in finally().
"promise/no-return-in-finally": "error",
// [nursery] Require return statements to either always or never specify values
"typescript/consistent-return": "off", // [reason: Doesn't seem like it would catch many bugs]
// [nursery] Enforce consistent usage of type exports
"typescript/consistent-type-exports": "error",
// [nursery] Enforce dot notation whenever possible
"typescript/dot-notation": "error",
// [nursery] Disallow conditionals where the type is always truthy or always falsy
"typescript/no-unnecessary-condition": "off", // FIXME (errors: 1560) [reason: This is a big project, and we should make sure we're not removing conditional checks that are dealing with bad data (improved types)]
// [nursery] Disallow unnecessary namespace qualifiers
"typescript/no-unnecessary-qualifier": "error",
// [nursery] Disallow conversion idioms when they do not change the type or value of the expression
"typescript/no-unnecessary-type-conversion": "error",
// [nursery] Disallow type parameters that aren't used multiple times
"typescript/no-unnecessary-type-parameters": "off", // TODO: Has issues with disable comments
// [nursery] Disallow default values that will never be used
"typescript/no-useless-default-assignment": "error",
// [nursery] Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result
"typescript/prefer-find": "error",
// [nursery] ⚠️ 🛠 (💡 suggestion) Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects
"typescript/prefer-optional-chain": "off", // DECIDEME (errors: 251)
// [nursery] Require private members to be marked as readonly if they're never modified outside of the constructor
"typescript/prefer-readonly": "error",
// [nursery] Require function parameters to be typed as readonly to prevent accidental mutation of inputs
"typescript/prefer-readonly-parameter-types": "off", // DECIDEME (errors: 10694)
// [nursery] Enforce RegExp#exec over String#match if no global flag is provided
"typescript/prefer-regexp-exec": "off", // DECIDEME (errors: 19)
// [nursery] (✅ recommended) Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings
"typescript/prefer-string-starts-ends-with": "error",
// [nursery] Enforce ES5 or ES6 class for returning value in render function
"react/require-render-return": "error",
// [nursery] (💭 needs type info) Disallow passing a value-returning function in a position accepting a void function
"typescript/strict-void-return": "off", // DECIDEME (errors: 2200)
// ------------------------------------------------------------------------
// Category: Pedantic
// ------------------------------------------------------------------------
// [pedantic] Enforce getter and setter pairs in objects and classes
"eslint/accessor-pairs": "off", // DECIDEME (errors: 2)
// [pedantic] (🚧 planned autofix) Enforce return statements in callbacks of array methods
"eslint/array-callback-return": "off", // DECIDEME (errors: 7)
// [pedantic] (⚠️ 🛠️ dangerous autofix) Require the use of === and !==
"eslint/eqeqeq": [
"error",
"always",
{
"null": "never" // [reason: `value == null` refines both null and undefined at the same time]
}
],
// [pedantic] Enforce a maximum number of classes per file
"eslint/max-classes-per-file": "error",
// [pedantic] Enforce a maximum depth that blocks can be nested
"eslint/max-depth": "off", // DECIDEME (errors: 22)
// [pedantic] Enforce a maximum number of lines per file
"eslint/max-lines": "off", // DECIDEME (errors: 404)
// [pedantic] Enforce a maximum number of lines of code in a function
"eslint/max-lines-per-function": "off", // DECIDEME (errors: 2698)
// [pedantic] Enforce a maximum depth that callbacks can be nested
"eslint/max-nested-callbacks": "error",
// [pedantic] (🛠️ autofix) Disallow Array constructors
"eslint/no-array-constructor": "error",
// [pedantic] (🚧 planned autofix) Disallow lexical declarations in case clauses
"eslint/no-case-declarations": "error",
// [pedantic] Disallow returning value from constructor
"eslint/no-constructor-return": "error",
// [pedantic] (🛠️ autofix) Disallow else blocks after return statements in if statements
"eslint/no-else-return": "error",
// [pedantic] (🚧 planned autofix) Disallow fallthrough of case statements
"eslint/no-fallthrough": "error",
// [pedantic] Disallow inline comments after code
"eslint/no-inline-comments": "off", // DECIDEME (errors: 333)
// [pedantic] Disallow variable or function declarations in nested blocks
"eslint/no-inner-declarations": [
"error",
{
"blockScopedFunctions": "disallow"
}
],
// [pedantic] (🚧 planned autofix) Disallow if statements as the only statement in else blocks
"eslint/no-lonely-if": "error",
// [pedantic] Disallow function declarations that contain unsafe references inside loop statements
"eslint/no-loop-func": "error",
// [pedantic] (🚧 planned autofix) Disallow negated conditions
"eslint/no-negated-condition": "off", // DECIDEME (errors: 260)
// [pedantic] (🛠️ autofix) Disallow new operators with the String, Number, and Boolean objects
"eslint/no-new-wrappers": "error",
// [pedantic] (🚧 planned autofix) Disallow calls to the Object constructor without an argument
"eslint/no-object-constructor": "error",
// [pedantic] (🚧 planned autofix) Disallow returning values from Promise executor functions
"eslint/no-promise-executor-return": "off", // DECIDEME (errors: 11)
// [pedantic] (🚧 planned autofix) Disallow calling some Object.prototype methods directly on objects
"eslint/no-prototype-builtins": "error",
// [pedantic] Disallow variable redeclaration
"eslint/no-redeclare": "error",
// [pedantic] Disallow comparisons where both sides are exactly the same
"eslint/no-self-compare": "error",
// [pedantic] (💡 suggestion) Disallow throwing literals as exceptions
"eslint/no-throw-literal": "off",
// [pedantic] (🚧 planned autofix) Disallow redundant return statements
"eslint/no-useless-return": "off", // DECIDEME (errors: 1)
// [pedantic] Disallow specified warning terms in comments
"eslint/no-warning-comments": "off", // DECIDEME (errors: 97)
// [pedantic] (⚠️ 🛠️ dangerous autofix) Enforce the use of the radix argument when using parseInt()
"eslint/radix": "error",
// [pedantic] (⚠️ 🛠️ dangerous autofix) Disallow async functions which have no await expression
"eslint/require-await": "off", // DECIDEME (errors: 662)
// [pedantic] (🚧 planned autofix) Enforce the use of 'u' or 'v' flag on regular expressions
"eslint/require-unicode-regexp": "off", // DECIDEME (errors: 290)
// [pedantic] (🚧 planned autofix) Require variables within the same declaration block to be sorted
"eslint/sort-vars": "off", // DECIDEME (errors: 1)
// [pedantic] Require symbol descriptions
"eslint/symbol-description": "error",
// [pedantic] Enforce the maximum number of dependencies a module can have.
"import/max-dependencies": "off", // DECIDEME (errors: 476)
// [pedantic] Disallow conditional logic in tests
// "jest/no-conditional-in-test": "error",
// [pedantic] (🚧 planned autofix) Requires that all function parameters are documented with a @param tag.
// "jsdoc/require-param": "error",
// [pedantic] (🚧 planned autofix) Requires that each @param tag has a description value.
// "jsdoc/require-param-description": "error",
// [pedantic] Requires that all @param tags have names.
// "jsdoc/require-param-name": "error",
// [pedantic] (🚧 planned autofix) Requires that each @param tag has a type value (in curly brackets).
// "jsdoc/require-param-type": "error",
// [pedantic] (🚧 planned autofix) Requires that returns are documented with @returns.
// "jsdoc/require-returns": "error",
// [pedantic] Requires that the @returns tag has a description value (not including void/undefined type returns).
// "jsdoc/require-returns-description": "error",
// [pedantic] Requires that @returns tag has type value (in curly brackets).
// "jsdoc/require-returns-type": "error",
// [pedantic] Enforce using onChange or readonly attribute when checked is used
"react/checked-requires-onchange-or-readonly": "error",
// [pedantic] Disallow missing displayName in a React component definition
"react/display-name": "error",
// [pedantic] (🚧 planned autofix) Disallow target="_blank" attribute without rel="noreferrer"
"react/jsx-no-target-blank": "error",
// [pedantic] (💡 suggestion) Disallow unnecessary fragments
"react/jsx-no-useless-fragment": ["error", { "allowExpressions": true }], // [reason: FILLMEIN]
// [pedantic] (🚧 planned autofix) Disallow unescaped HTML entities from appearing in markup
"react/no-unescaped-entities": "error",
// [pedantic] Enforces the Rules of Hooks, ensuring that React Hooks are only called in valid contexts and in the correct order.
"react/rules-of-hooks": "error",
// [pedantic] (🛠️ autofix) Disallow @ts-<directive> comments or require descriptions after directives
"typescript/ban-ts-comment": "error",
// [pedantic] This rule bans specific types and can suggest alternatives. Note that it does not ban the corresponding runtime objects from being used.
"typescript/ban-types": "error",
// [pedantic] (🛠️ autofix) (💡 suggestion) Require expressions of type void to appear in statement position
"typescript/no-confusing-void-expression": "off", // DECIDEME (errors: 621)
// [pedantic] Disallow using code marked as @deprecated
"typescript/no-deprecated": "off", // FIXME (errors: 187)
// [pedantic] Disallow Promises in places not designed to handle them
"typescript/no-misused-promises": ["error", { "checksVoidReturn": false }], // [reason: FILLMEIN] (errors: 352)
// [pedantic] Disallow enums from having both number and string members
"typescript/no-mixed-enums": "error",
// [pedantic] Disallow calling a function with a value with type any
"typescript/no-unsafe-argument": "off", // LATER (errors: 531)
// [pedantic] Disallow assigning a value with type any to variables and properties
"typescript/no-unsafe-assignment": "off", // LATER (errors: 817)
// [pedantic] Disallow calling a value with type any
"typescript/no-unsafe-call": "off", // LATER (errors: 364)
// [pedantic] Disallow using the unsafe built-in Function type
"typescript/no-unsafe-function-type": "error",
// [pedantic] Disallow member access on a value with type any
"typescript/no-unsafe-member-access": "off", // LATER (errors: 1087)
// [pedantic] Disallow returning a value with type any from a function
"typescript/no-unsafe-return": "off", // LATER (errors: 123)
// [pedantic] Disallow throwing non-Error values as exceptions
"typescript/only-throw-error": "error",
// [pedantic] (💡 suggestion) Require each enum member value to be explicitly initialized
"typescript/prefer-enum-initializers": "off", // DECIDEME (errors: 180)
// [pedantic] (🛠️ autofix) Enforce includes method over indexOf method
"typescript/prefer-includes": "error",
// [pedantic] (🛠️ autofix) Enforce using the nullish coalescing operator instead of logical assignments or chaining
"typescript/prefer-nullish-coalescing": "off", // DECIDEME (errors: 1199)
// [pedantic] Require using Error objects as Promise rejection reasons
"typescript/prefer-promise-reject-errors": "off", // DECIDEME (errors: 20)
// [pedantic] (🛠️ autofix) Enforce using @ts-expect-error over @ts-ignore
"typescript/prefer-ts-expect-error": "error",
// [pedantic] Enforce that get() types should be assignable to their equivalent set() type
"typescript/related-getter-setter-pairs": "error",
// [pedantic] (🚧 planned autofix) Disallow async functions which do not return promises and have no await expression
"typescript/require-await": "off", // DECIDEME (errors: 373)
// [pedantic] Require both operands of addition to be the same type and be bigint, number, or string
"typescript/restrict-plus-operands": "error",
// [pedantic] (🛠️ autofix) (💡 suggestion) Enforce consistent awaiting of returned promises
"typescript/return-await": "error",
// [pedantic] (🚧 planned autofix) Disallow certain types in boolean expressions
"typescript/strict-boolean-expressions": "off", // DECIDEME (errors: 4219)
// [pedantic] (💡 suggestion) Require switch-case statements to be exhaustive
"typescript/switch-exhaustiveness-check": "off", // DECIDEME (errors: 35)
// [pedantic] (🛠️ autofix) Enforce consistent assertion style with node:assert.
"unicorn/consistent-assert": "off", // DECIDEME (errors: 18)
// [pedantic] (💡 suggestion) consistent-empty-array-spread
"unicorn/consistent-empty-array-spread": "error",
// [pedantic] (🛠️ autofix) Require escape sequences to use uppercase or lowercase values.
"unicorn/escape-case": "off", // DECIDEME (errors: 93)
// [pedantic] (🛠️ autofix) Enforce explicitly comparing the length or size property of a value.
"unicorn/explicit-length-check": "off", // DECIDEME (errors: 352)
// [pedantic] (🚧 planned autofix) Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.
"unicorn/new-for-builtins": "off", // DECIDEME (errors: 68)
// [pedantic] (🚧 planned autofix) (errors: 248) Prevent passing a function reference directly to iterator methods.
"unicorn/no-array-callback-reference": "off", // DECIDEME (errors: 254)
// [pedantic] (🛠️ autofix) Enforce the use of Unicode escapes instead of hexadecimal escapes.
"unicorn/no-hex-escape": "off", // DECIDEME (errors: 4)
// [pedantic] (🚧 planned autofix) Disallow immediate mutation after variable assignment.
"unicorn/no-immediate-mutation": "off", // DECIDEME (errors: 12)
// [pedantic] (🛠️ autofix) Require Array.isArray() instead of instanceof Array.
"unicorn/no-instanceof-array": "off", // DECIDEME (errors: 4)
// [pedantic] (🚧 planned autofix) Disallow if statements as the only statement in if blocks without else.
"unicorn/no-lonely-if": "off", // DECIDEME (errors: 41)
// [pedantic] (🚧 planned autofix) Disallow negated conditions.
"unicorn/no-negated-condition": "off", // DECIDEME (errors: 269)
// [pedantic] (💡 suggestion) Disallow negated expression in equality check.
"unicorn/no-negation-in-equality-check": "error",
// [pedantic] (💡 suggestion) Enforce the use of Buffer.from() and Buffer.alloc() instead of the deprecated new Buffer().
"unicorn/no-new-buffer": "error",
// [pedantic] Disallow the use of objects as default parameters.
"unicorn/no-object-as-default-parameter": "off", // DECIDEME (errors: 19)
// [pedantic] (⚠️ 🛠️ dangerous autofix) Disallow classes that only have static members.
"unicorn/no-static-only-class": "off", // DECIDEME (errors: 1)
// [pedantic] Disallow assigning this to a variable.
"unicorn/no-this-assignment": "error",
// [pedantic] (🛠️ autofix) (💡 suggestion) Disallow comparing undefined using typeof.
"unicorn/no-typeof-undefined": "off", // DECIDEME (errors: 3)
// [pedantic] (💡 suggestion) Disallow using 1 as the depth argument of Array#flat().
"unicorn/no-unnecessary-array-flat-depth": "off", // DECIDEME (errors: 1)
// [pedantic] (🛠️ autofix) Disallow using .length or Infinity as the deleteCount or skipCount argument of Array#{splice,toSpliced}().
"unicorn/no-unnecessary-array-splice-count": "error",
// [pedantic] (🛠️ autofix) Disallow using .length or Infinity as the end argument of {Array,String,TypedArray}#slice().
"unicorn/no-unnecessary-slice-end": "off", // DECIDEME (errors: 3)
// [pedantic] Disallow unreadable IIFEs.
"unicorn/no-unreadable-iife": "error",
// [pedantic] (🛠️ autofix) Disallow returning/yielding Promise.resolve/reject() in async functions or promise callbacks
"unicorn/no-useless-promise-resolve-reject": "off", // DECIDEME (errors: 15)
// [pedantic] (🚧 planned autofix) Disallow useless case in switch statements.
"unicorn/no-useless-switch-case": "off", // DECIDEME (errors: 6)
// [pedantic] (🛠️ autofix) Disallow useless undefined.
"unicorn/no-useless-undefined": "off", // DECIDEME (errors: 343)
// [pedantic] (⚠️ 🛠️ dangerous autofix) Prefer .flatMap(…) over .map(…).flat().
"unicorn/prefer-array-flat": "error",
// [pedantic] (🛠️ autofix) Prefer .some(…) over .filter(…).length check and .{find,findLast,findIndex,findLastIndex}(…).
"unicorn/prefer-array-some": "off", // DECIDEME (errors: 2)
// [pedantic] (⚠️ 🛠️ dangerous autofix) Prefer .at() method for index access and String#charAt().
"unicorn/prefer-at": "off", // DECIDEME (errors: 20)
// [pedantic] (🚧 planned autofix) Prefer Blob#arrayBuffer() over FileReader#readAsArrayBuffer(…) and Blob#text() over FileReader#readAsText(…).
"unicorn/prefer-blob-reading-methods": "off", // DECIDEME (errors: 3)
// [pedantic] (🛠️ autofix) Prefer String#codePointAt(…) over String#charCodeAt(…) and String.fromCodePoint(…) over String.fromCharCode(…).
"unicorn/prefer-code-point": "off", // DECIDEME (errors: 8)
// [pedantic] (🛠️ autofix) Prefer Date.now() to get the number of milliseconds since the Unix Epoch.
"unicorn/prefer-date-now": "off", // DECIDEME (errors: 15)
// [pedantic] (🛠️ autofix) Prefer Node#append() over Node#appendChild().
"unicorn/prefer-dom-node-append": "off", // DECIDEME (errors: 38)
// [pedantic] (🛠️ autofix) Prefer using .dataset on DOM elements over calling attribute methods.
"unicorn/prefer-dom-node-dataset": "off", // DECIDEME (errors: 5)
// [pedantic] (🚧 planned autofix) Prefer childNode.remove() over parentNode.removeChild(childNode).
"unicorn/prefer-dom-node-remove": "off", // DECIDEME (errors: 12)
// [pedantic] Prefer EventTarget over EventEmitter.
"unicorn/prefer-event-target": "off", // DECIDEME (errors: 29)
// [pedantic] (🛠️ autofix) Prefer Math.min() and Math.max() over ternaries for simple comparisons.
"unicorn/prefer-math-min-max": "error",
// [pedantic] (💡 suggestion) Enforce the use of Math.trunc instead of bitwise operators.
"unicorn/prefer-math-trunc": "off", // DECIDEME (errors: 6)
// [pedantic] (🚧 planned autofix) Prefer using String, Number, BigInt, Boolean, and Symbol directly.
"unicorn/prefer-native-coercion-functions": "off", // DECIDEME (errors: 10)
// [pedantic] (🛠️ autofix) Prefer borrowing methods from the prototype instead of the instance.
"unicorn/prefer-prototype-methods": "error",
// [pedantic] (🛠️ autofix) Prefer .querySelector() over .getElementById(), .querySelectorAll() over .getElementsByClassName() and .getElementsByTagName() and .getElementsByName().
"unicorn/prefer-query-selector": "off", // DECIDEME (errors: 9)
// [pedantic] (🛠️ autofix) Prefer RegExp#test() over String#match() and RegExp#exec().
"unicorn/prefer-regexp-test": "error",
// [pedantic] (🛠️ autofix) Prefer String#replaceAll() over regex searches with the global flag.
"unicorn/prefer-string-replace-all": "off", // DECIDEME (errors: 52)
// [pedantic] (🛠️ autofix) Prefer String#slice() over String#substr() and String#substring().
"unicorn/prefer-string-slice": "off", // DECIDEME (errors: 33)
// [pedantic] (🚧 planned autofix) Prefer top-level await over top-level promises and async function calls.
"unicorn/prefer-top-level-await": "off", // DECIDEME (errors: 41)
// [pedantic] (🛠️ autofix) Enforce throwing TypeError in type checking conditions.
"unicorn/prefer-type-error": "off", // DECIDEME (errors: 27)
// [pedantic] (🛠️ autofix) Enforce using the digits argument with Number#toFixed().
"unicorn/require-number-to-fixed-digits-argument": "error",
// ------------------------------------------------------------------------
// Category: Perf
// ------------------------------------------------------------------------
// [perf] Disallow await inside of loops
"eslint/no-await-in-loop": "error",
// [perf] Disallow unnecessary calls to .call() and .apply()
"eslint/no-useless-call": "off", // DECIDEME (errors: 1)
// [perf] Prevents using object or array spreads on accumulators in Array.prototype.reduce() and in loops.
"oxc/no-accumulating-spread": "off", // DECIDEME (errors: 11)
// [perf] (🛠️ autofix) (💡 suggestion) Disallow the use of object or array spreads in Array.prototype.map and Array.prototype.flatMap to add properties/elements to array items.
"oxc/no-map-spread": "off", // DECIDEME (errors: 102)
// [perf] Prevent JSX that are local to the current method from being used as values of JSX props
"react-perf/jsx-no-jsx-as-prop": "off", // DECIDEME (errors: 218)
// [perf] Prevent Arrays that are local to the current method from being used as values of JSX props
"react-perf/jsx-no-new-array-as-prop": "off", // DECIDEME (errors: 296)
// [perf] Prevent Functions that are local to the current method from being used as values of JSX props
"react-perf/jsx-no-new-function-as-prop": "off", // DECIDEME (errors: 1088)
// [perf] Prevent Objects that are local to the current method from being used as values of JSX props
"react-perf/jsx-no-new-object-as-prop": "off", // DECIDEME (errors: 579)
// [perf] Disallows JSX context provider values from taking values that will cause needless rerenders
"react/jsx-no-constructed-context-values": "off", // DECIDEME (errors: 1)
// [perf] Disallow usage of Array index in keys
"react/no-array-index-key": "error",
// [perf] (🚧 planned autofix) Prefer .find(…) and .findLast(…) over the first or last element from .filter(…).
"unicorn/prefer-array-find": "off", // DECIDEME (errors: 7)
// [perf] (🛠️ autofix) Prefer .flatMap(…) over .map(…).flat().
"unicorn/prefer-array-flat-map": "off", // DECIDEME (errors: 10)
// [perf] (⚠️ 🛠️ dangerous autofix) Prefer Set#has() over Array#includes() when checking for existence or non-existence.
"unicorn/prefer-set-has": "off", // DECIDEME (errors: 7)
// ------------------------------------------------------------------------
// Category: Restriction
// ------------------------------------------------------------------------
// [restriction] Enforce that class methods utilize this
"eslint/class-methods-use-this": "off", // DECIDEME (errors: 271)
// [restriction] Enforce a maximum cyclomatic complexity allowed in a program
"eslint/complexity": "off", // DECIDEME (errors: 211)
// [restriction] Require default cases in switch statements
"eslint/default-case": "error",
// [restriction] Disallow the use of alert, confirm, and prompt
"eslint/no-alert": "error",
// [restriction] Disallow bitwise operators
"eslint/no-bitwise": "error",
// [restriction] (💡 suggestion) Disallow the use of console
"eslint/no-console": "error", // [reason: We should use our own logger]
// [restriction] (🛠️ autofix) Disallow equal signs explicitly at the beginning of regular expressions
"eslint/no-div-regex": "off", // DECIDEME (errors: 1)
// [restriction] (💡 suggestion) Disallow empty block statements
"eslint/no-empty": "error",
// [restriction] (🚧 planned autofix) Disallow empty functions
"eslint/no-empty-function": "error",
// [restriction] (⚠️ 🛠️ dangerous autofix) Disallow null comparisons without type-checking operators
"eslint/no-eq-null": "off", // DECIDEME (errors: 1678)
// [restriction] Disallow declarations in the global scope
"eslint/no-implicit-globals": "error",
// [restriction] Disallow reassigning function parameters
"eslint/no-param-reassign": [
"error",
{
"props": true,
"ignorePropertyModificationsFor": ["acc", "ctx", "context"]
}
],
// [restriction] (💡 suggestion) Disallow the unary operators ++ and --
"eslint/no-plusplus": "error",
// [restriction] (🚧 planned autofix) Disallow the use of the __proto__ property
"eslint/no-proto": "error",
// [restriction] (🛠️ autofix) Disallow multiple spaces in regular expressions
"eslint/no-regex-spaces": "error",
// [restriction] Disallow specified global variables
"eslint/no-restricted-globals": [
"error",
{
"name": "__dirname",
"message": "Use getAppRootDir() instead of __dirname"
}
],
// [restriction] Disallow specified modules when loaded by import
"eslint/no-restricted-imports": [
"error",
{
"paths": [
{
"name": "chai",
"importNames": ["expect", "should", "Should"],
"message": "Please use assert",
"allowTypeImports": true
}
]
}
],
// [restriction] Disallow comma operators
"eslint/no-sequences": "error",
// [restriction] Disallow the use of undefined as an identifier
"eslint/no-undefined": "off", // DECIDEME (errors: 4148)
// [restriction] Disallow the use of variables before they are defined
"eslint/no-use-before-define": "off", // DECIDEME (errors: 2397)
// [restriction] (🛠️ autofix) Require let or const instead of var
"eslint/no-var": "error",
// [restriction] (💡 suggestion) Disallow void operators
"eslint/no-void": ["error", { "allowAsStatement": true }], // [reason: Deprecated, either await promises or use the drop() util to ignore them]
// [restriction] (🛠️ autofix) Require or disallow Unicode byte order mark (BOM)
"eslint/unicode-bom": "error",
// [restriction] Ensure consistent use of file extension within the import path.
"import/extensions": [
"error",
"always",
{ "ignorePackages": true, "checkTypeImports": true }
],
// [restriction] Forbid AMD require and define calls.
"import/no-amd": "error",
// [restriction] Forbid CommonJS require calls and module.exports or exports.*.
"import/no-commonjs": "off", // DECIDEME (errors: 100)
// [restriction] Forbid a module from importing a module with a dependency path back to itself.
"import/no-cycle": "off", // TODO
// [restriction] Forbid default exports.
"import/no-default-export": "off", // DECIDEME (errors: 450)
// [restriction] Forbid require() calls with expressions.
"import/no-dynamic-require": "error",
// [restriction] Forbid importing modules from parent directories.
"import/no-relative-parent-imports": "off", // DECIDEME (errors: 11412)
// [restriction] Forbid webpack loader syntax in imports.
"import/no-webpack-loader-syntax": "error",
// [restriction] unambiguous Forbid potentially ambiguous parse goal (script vs. module).
"import/unambiguous": "off", // DECIDEME (errors: 37)
// [restriction] Checks that @access tags have a valid value.
"jsdoc/check-access": "error",
// [restriction] (🚧 planned autofix) Checks tags that are expected to be empty (e.g., @abstract or @async), reporting if they have content
"jsdoc/empty-tags": "error",
// [restriction] Enforce <a> text to not exactly match "click here", "here", "link", or "a link".
"jsx-a11y/anchor-ambiguous-text": "error",
// [restriction] Disallow new operators with calls to require
"node/no-new-require": "error",
// [restriction] Disallow string concatenation with __dirname and __filename
"node/no-path-concat": "error",
// [restriction] Disallow the use of process.env
"node/no-process-env": "off", // DECIDEME (errors: 101)
// [restriction] (💡 suggestion) Disallows bitwise operators where logical operators are expected.
"oxc/bad-bitwise-operator": "error",
// [restriction] Disallows the use of async/await.
"oxc/no-async-await": "off", // DECIDEME (errors: 4227)
// [restriction] Disallow the use of barrel files where the file contains export * statements, and the total number of modules exceed a threshold.
"oxc/no-barrel-file": "error",
// [restriction] (🛠️ autofix) Disallow TypeScript const enum
"oxc/no-const-enum": "off", // DECIDEME (errors: 1)
// [restriction] Disallow optional chaining.
"oxc/no-optional-chaining": "off", // DECIDEME (errors: 3068)
// [restriction] Disallow Object Rest/Spread Properties.
"oxc/no-rest-spread-properties": "off", // DECIDEME (errors: 3313)
// [restriction] Enforce the use of catch() on un-returned promises.