eslint-config-setup 0.3.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,6 @@ import globals from "globals"
8
8
  import importXPlugin from "eslint-plugin-import-x"
9
9
  import jsdocPlugin from "eslint-plugin-jsdoc"
10
10
  import jsonPlugin from "@eslint/json"
11
- import jsxA11yPlugin from "eslint-plugin-jsx-a11y"
12
11
  import nodePlugin from "eslint-plugin-n"
13
12
  import oxlintPlugin from "eslint-plugin-oxlint"
14
13
  import packageJsonPlugin from "eslint-plugin-package-json"
@@ -27,13 +26,99 @@ import unicornPlugin from "eslint-plugin-unicorn"
27
26
  import unusedImportsPlugin from "eslint-plugin-unused-imports"
28
27
  import vitestPlugin from "@vitest/eslint-plugin"
29
28
 
29
+ // React compat plugin — maps @eslint-react rule families into the `react/` namespace
30
+ // and aliases rules to legacy eslint-plugin-react names for OxLint compatibility.
31
+ const reactCompatPlugin = (() => {
32
+ const core = eslintReactPlugin.rules
33
+ const select = (prefix) => Object.fromEntries(
34
+ Object.entries(core)
35
+ .filter(([name]) => name.startsWith(prefix))
36
+ .map(([name, rule]) => [name.slice(prefix.length), rule]),
37
+ )
38
+ const dom = select("dom-")
39
+ const jsx = select("jsx-")
40
+ const naming = select("naming-convention-")
41
+ const rsc = select("rsc-")
42
+ const webApi = select("web-api-")
43
+
44
+ // Legacy aliases: legacy name → [source, original name]
45
+ const aliases = {
46
+ "jsx-key": [core, "no-missing-key"],
47
+ "jsx-key-before-spread": [jsx, "no-key-after-spread"],
48
+ "jsx-no-constructed-context-values": [core, "no-unstable-context-value"],
49
+ "jsx-no-leaked-render": [core, "no-leaked-conditional-rendering"],
50
+ "jsx-no-useless-fragment": [jsx, "no-useless-fragment"],
51
+ "no-object-type-as-default-prop": [core, "no-unstable-default-props"],
52
+ "no-unstable-nested-components": [core, "no-nested-component-definitions"],
53
+ "display-name": [core, "no-missing-component-display-name"],
54
+ "forward-ref-uses-ref": [core, "no-forward-ref"],
55
+ "no-did-mount-set-state": [core, "no-set-state-in-component-did-mount"],
56
+ "no-did-update-set-state": [core, "no-set-state-in-component-did-update"],
57
+ "no-will-update-set-state": [core, "no-set-state-in-component-will-update"],
58
+ "hook-use-state": [core, "use-state"],
59
+ "no-danger": [dom, "no-dangerously-set-innerhtml"],
60
+ "no-danger-with-children": [dom, "no-dangerously-set-innerhtml-with-children"],
61
+ "no-find-dom-node": [dom, "no-find-dom-node"],
62
+ "no-namespace": [jsx, "no-namespace"],
63
+ "no-render-return-value": [dom, "no-render-return-value"],
64
+ "jsx-no-script-url": [dom, "no-script-url"],
65
+ "jsx-no-target-blank": [dom, "no-unsafe-target-blank"],
66
+ "no-unknown-property": [dom, "no-unknown-property"],
67
+ "void-dom-elements-no-children": [dom, "no-void-elements-with-children"],
68
+ "button-has-type": [dom, "no-missing-button-type"],
69
+ "iframe-missing-sandbox": [dom, "no-missing-iframe-sandbox"],
70
+ "style-prop-object": [dom, "no-string-style-prop"],
71
+ }
72
+
73
+ // Identical-name aliases (core rules where legacy name = @eslint-react name)
74
+ const identicalCore = [
75
+ "no-access-state-in-setstate", "no-array-index-key",
76
+ "no-direct-mutation-state",
77
+ "no-unused-class-component-members", "no-unused-state",
78
+ ]
79
+ for (const n of identicalCore) aliases[n] = [core, n]
80
+ aliases["no-children-prop"] = [jsx, "no-children-prop"]
81
+ aliases["jsx-no-comment-textnodes"] = [jsx, "no-comment-textnodes"]
82
+
83
+ // Build aliased originals set
84
+ const aliasedCore = new Set()
85
+ for (const [src, name] of Object.values(aliases)) {
86
+ if (src === core) aliasedCore.add(name)
87
+ else if (src === dom) aliasedCore.add("dom-" + name)
88
+ else if (src === jsx) aliasedCore.add("jsx-" + name)
89
+ else if (src === naming) aliasedCore.add("naming-convention-" + name)
90
+ else if (src === rsc) aliasedCore.add("rsc-" + name)
91
+ else if (src === webApi) aliasedCore.add("web-api-" + name)
92
+ }
93
+ const rules = {}
94
+
95
+ // Core rules (skip aliased originals)
96
+ for (const [n, r] of Object.entries(core)) { if (!aliasedCore.has(n)) rules[n] = r }
97
+
98
+ // Sub-plugin rules (skip aliased + prefer-namespace-import collision)
99
+ const subs = [[dom, new Set(['prefer-namespace-import'])], [jsx], [webApi], [naming], [rsc]]
100
+ for (const [src, skip] of subs) {
101
+ for (const [n, r] of Object.entries(src)) {
102
+ if (skip && skip.has(n)) continue
103
+ if (Object.values(aliases).some(([s, o]) => s === src && o === n)) continue
104
+ rules[n] = r
105
+ }
106
+ }
107
+
108
+ // Add legacy aliases
109
+ for (const [legacy, [src, orig]] of Object.entries(aliases)) rules[legacy] = src[orig]
110
+
111
+ return { meta: { name: "react-compat", version: "1.0.0" }, rules }
112
+ })()
113
+
30
114
  export default [
31
115
  // TypeScript parser setup
32
116
  ...tseslint.configs.strictTypeChecked.slice(0, 2),
33
117
 
34
- // Base rules — all effective rules for *.ts files
118
+ // Base rules — all effective rules for TS plus shared JS/TS rules
35
119
  {
36
120
  name: "eslint-config-setup/base",
121
+ ignores: ["**/*.{md,mdx}"],
37
122
  plugins: {
38
123
  "@cspell": cspellPlugin,
39
124
  "@stylistic": stylisticPlugin,
@@ -41,13 +126,10 @@ export default [
41
126
  "de-morgan": deMorganPlugin,
42
127
  "import": importXPlugin,
43
128
  "jsdoc": jsdocPlugin,
44
- "jsx-a11y": jsxA11yPlugin,
45
129
  "node": nodePlugin,
46
130
  "perfectionist": perfectionistPlugin,
47
- "react": eslintReactPlugin,
48
- "react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
131
+ "react": reactCompatPlugin,
49
132
  "react-hooks": reactHooksPlugin,
50
- "react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
51
133
  "react-you-might-not-need-an-effect": reactEffectPlugin,
52
134
  "regexp": regexpPlugin,
53
135
  "security": securityPlugin,
@@ -92,7 +174,6 @@ export default [
92
174
  }
93
175
  ],
94
176
  "@typescript-eslint/dot-notation": "error",
95
- "@typescript-eslint/explicit-member-accessibility": "error",
96
177
  "@typescript-eslint/member-ordering": [
97
178
  "warn",
98
179
  {
@@ -152,10 +233,6 @@ export default [
152
233
  ]
153
234
  }
154
235
  ],
155
- "@typescript-eslint/method-signature-style": [
156
- "error",
157
- "property"
158
- ],
159
236
  "@typescript-eslint/naming-convention": [
160
237
  "error",
161
238
  {
@@ -289,7 +366,12 @@ export default [
289
366
  "@typescript-eslint/no-for-in-array": "error",
290
367
  "@typescript-eslint/no-implied-eval": "error",
291
368
  "@typescript-eslint/no-meaningless-void-operator": "error",
292
- "@typescript-eslint/no-misused-promises": "error",
369
+ "@typescript-eslint/no-misused-promises": [
370
+ "error",
371
+ {
372
+ "checksVoidReturn": false
373
+ }
374
+ ],
293
375
  "@typescript-eslint/no-misused-spread": "error",
294
376
  "@typescript-eslint/no-mixed-enums": "error",
295
377
  "@typescript-eslint/no-redundant-type-constituents": "error",
@@ -397,7 +479,12 @@ export default [
397
479
  "getBeforeSet"
398
480
  ],
399
481
  "guard-for-in": "error",
400
- "import/newline-after-import": "error",
482
+ "import/no-extraneous-dependencies": [
483
+ "error",
484
+ {
485
+ "includeTypes": true
486
+ }
487
+ ],
401
488
  "import/no-useless-path-segments": "error",
402
489
  "jsdoc/check-alignment": "error",
403
490
  "jsdoc/check-param-names": "error",
@@ -413,13 +500,9 @@ export default [
413
500
  "jsdoc/reject-function-type": "error",
414
501
  "jsdoc/require-next-type": "error",
415
502
  "jsdoc/require-returns-check": "error",
416
- "jsdoc/require-throws-type": "error",
417
503
  "jsdoc/require-yields-check": "error",
418
- "jsdoc/require-yields-type": "error",
419
504
  "jsdoc/ts-no-empty-object-type": "error",
420
505
  "jsdoc/valid-types": "error",
421
- "jsx-a11y/interactive-supports-focus": "error",
422
- "jsx-a11y/no-noninteractive-element-interactions": "error",
423
506
  "logical-assignment-operators": [
424
507
  "error",
425
508
  "always",
@@ -442,7 +525,7 @@ export default [
442
525
  "max-lines-per-function": [
443
526
  "error",
444
527
  {
445
- "max": 50,
528
+ "max": 100,
446
529
  "skipBlankLines": true,
447
530
  "skipComments": true
448
531
  }
@@ -474,6 +557,7 @@ export default [
474
557
  "no-extra-bind": "error",
475
558
  "no-fallthrough": "error",
476
559
  "no-implicit-coercion": "error",
560
+ "no-implicit-globals": "error",
477
561
  "no-labels": "error",
478
562
  "no-lone-blocks": "error",
479
563
  "no-lonely-if": "error",
@@ -503,18 +587,29 @@ export default [
503
587
  ],
504
588
  "no-script-url": "error",
505
589
  "no-self-compare": "error",
506
- "no-sequences": "error",
590
+ "no-sequences": [
591
+ "error",
592
+ {
593
+ "allowInParentheses": false
594
+ }
595
+ ],
507
596
  "no-template-curly-in-string": "error",
508
597
  "no-unmodified-loop-condition": "error",
509
598
  "no-unneeded-ternary": "error",
510
599
  "no-unreachable-loop": "error",
511
600
  "no-useless-assignment": "error",
512
601
  "no-useless-call": "error",
513
- "no-useless-computed-key": "error",
602
+ "no-useless-computed-key": [
603
+ "error",
604
+ {
605
+ "enforceForClassMembers": true
606
+ }
607
+ ],
514
608
  "no-useless-concat": "error",
515
609
  "no-useless-return": "error",
516
610
  "no-var": "error",
517
611
  "no-warning-comments": "warn",
612
+ "node/handle-callback-err": "error",
518
613
  "node/hashbang": "error",
519
614
  "node/no-deprecated-api": "error",
520
615
  "node/no-exports-assign": "error",
@@ -543,10 +638,12 @@ export default [
543
638
  ],
544
639
  "node/prefer-promises/dns": "error",
545
640
  "node/prefer-promises/fs": "error",
641
+ "node/process-exit-as-throw": "error",
546
642
  "object-shorthand": [
547
643
  "error",
548
644
  "always",
549
645
  {
646
+ "avoidExplicitReturnArrows": true,
550
647
  "avoidQuotes": true
551
648
  }
552
649
  ],
@@ -581,14 +678,10 @@ export default [
581
678
  "allowNamedFunctions": true
582
679
  }
583
680
  ],
584
- "prefer-const": [
585
- "error",
586
- {
587
- "destructuring": "all"
588
- }
589
- ],
681
+ "prefer-const": "error",
590
682
  "prefer-exponentiation-operator": "error",
591
683
  "prefer-named-capture-group": "error",
684
+ "prefer-numeric-literals": "error",
592
685
  "prefer-object-has-own": "error",
593
686
  "prefer-object-spread": "error",
594
687
  "prefer-regex-literals": "error",
@@ -597,41 +690,74 @@ export default [
597
690
  "prefer-template": "error",
598
691
  "preserve-caught-error": "error",
599
692
  "radix": "error",
600
- "react-dom/no-dangerously-set-innerhtml": "warn",
601
- "react-dom/no-dangerously-set-innerhtml-with-children": "error",
602
- "react-dom/no-missing-button-type": "error",
603
- "react-dom/no-missing-iframe-sandbox": "error",
604
- "react-dom/no-string-style-prop": "error",
605
- "react-dom/no-unknown-property": "error",
606
- "react-dom/no-unsafe-target-blank": "error",
607
- "react-dom/no-void-elements-with-children": "error",
608
- "react-hooks/rules-of-hooks": "error",
609
- "react-web-api/no-leaked-event-listener": "error",
610
- "react-web-api/no-leaked-interval": "error",
611
- "react-web-api/no-leaked-resize-observer": "error",
612
- "react-web-api/no-leaked-timeout": "error",
693
+ "react-hooks/config": "error",
694
+ "react-hooks/error-boundaries": "error",
695
+ "react-hooks/gating": "error",
696
+ "react-hooks/globals": "error",
697
+ "react-hooks/immutability": "error",
698
+ "react-hooks/incompatible-library": "warn",
699
+ "react-hooks/preserve-manual-memoization": "error",
700
+ "react-hooks/purity": "error",
701
+ "react-hooks/refs": "error",
702
+ "react-hooks/set-state-in-effect": "error",
703
+ "react-hooks/set-state-in-render": "error",
704
+ "react-hooks/static-components": "error",
705
+ "react-hooks/unsupported-syntax": "warn",
706
+ "react-hooks/use-memo": "error",
707
+ "react-hooks/void-use-memo": "error",
613
708
  "react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
614
709
  "react-you-might-not-need-an-effect/no-chain-state-updates": "error",
615
710
  "react-you-might-not-need-an-effect/no-derived-state": "error",
616
- "react-you-might-not-need-an-effect/no-empty-effect": "error",
617
711
  "react-you-might-not-need-an-effect/no-event-handler": "error",
712
+ "react-you-might-not-need-an-effect/no-external-store-subscription": "error",
618
713
  "react-you-might-not-need-an-effect/no-initialize-state": "error",
619
714
  "react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
620
715
  "react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
621
716
  "react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
622
- "react/jsx-shorthand-boolean": "error",
717
+ "react/context-name": "warn",
718
+ "react/function-definition": "error",
719
+ "react/id-name": "warn",
720
+ "react/jsx-key-before-spread": "error",
721
+ "react/jsx-no-children-prop-with-children": "error",
722
+ "react/jsx-no-leaked-dollar": "warn",
723
+ "react/jsx-no-leaked-render": "error",
724
+ "react/jsx-no-leaked-semicolon": "warn",
623
725
  "react/no-access-state-in-setstate": "error",
726
+ "react/no-children-count": "warn",
727
+ "react/no-children-for-each": "warn",
728
+ "react/no-children-map": "warn",
729
+ "react/no-children-only": "warn",
730
+ "react/no-children-to-array": "warn",
731
+ "react/no-class-component": "error",
732
+ "react/no-component-will-mount": "error",
733
+ "react/no-component-will-receive-props": "error",
734
+ "react/no-component-will-update": "error",
624
735
  "react/no-context-provider": "error",
736
+ "react/no-create-ref": "error",
625
737
  "react/no-duplicate-key": "error",
626
- "react/no-forward-ref": "error",
627
- "react/no-leaked-conditional-rendering": "error",
628
- "react/no-missing-key": "error",
629
- "react/no-nested-component-definitions": "error",
630
- "react/no-unstable-context-value": "error",
631
- "react/no-unstable-default-props": "error",
738
+ "react/no-flush-sync": "error",
739
+ "react/no-hydrate": "error",
740
+ "react/no-implicit-key": "error",
741
+ "react/no-leaked-event-listener": "error",
742
+ "react/no-leaked-fetch": "warn",
743
+ "react/no-leaked-intersection-observer": "warn",
744
+ "react/no-leaked-interval": "error",
745
+ "react/no-leaked-resize-observer": "error",
746
+ "react/no-leaked-timeout": "error",
747
+ "react/no-misused-capture-owner-stack": "error",
748
+ "react/no-nested-lazy-component-declarations": "error",
749
+ "react/no-render": "error",
750
+ "react/no-unnecessary-use-prefix": "warn",
751
+ "react/no-unsafe-component-will-mount": "warn",
752
+ "react/no-unsafe-component-will-receive-props": "warn",
753
+ "react/no-unsafe-component-will-update": "warn",
754
+ "react/no-unsafe-iframe-sandbox": "warn",
755
+ "react/no-unused-class-component-members": "warn",
756
+ "react/no-unused-props": "warn",
632
757
  "react/no-unused-state": "error",
633
758
  "react/no-use-context": "error",
634
- "react/no-useless-fragment": "error",
759
+ "react/no-use-form-state": "error",
760
+ "react/ref-name": "warn",
635
761
  "regexp/confusing-quantifier": "warn",
636
762
  "regexp/control-character-escape": "error",
637
763
  "regexp/match-any": "error",
@@ -759,16 +885,9 @@ export default [
759
885
  "sonarjs/public-static-readonly": "error",
760
886
  "sonarjs/reduce-initial-value": "error",
761
887
  "symbol-description": "error",
762
- "unicorn/custom-error-definition": "error",
763
888
  "unicorn/no-array-push-push": "error",
889
+ "unicorn/no-for-each": "error",
764
890
  "unicorn/no-for-loop": "error",
765
- "unicorn/prefer-export-from": [
766
- "error",
767
- {
768
- "ignoreUsedVariables": true
769
- }
770
- ],
771
- "unicorn/prefer-import-meta-properties": "error",
772
891
  "unicorn/prefer-switch": [
773
892
  "error",
774
893
  {
@@ -788,12 +907,16 @@ export default [
788
907
  rules: {
789
908
  "@typescript-eslint/await-thenable": "off",
790
909
  "@typescript-eslint/consistent-return": "off",
910
+ "@typescript-eslint/consistent-type-exports": "off",
791
911
  "@typescript-eslint/dot-notation": "off",
912
+ "@typescript-eslint/member-ordering": "off",
913
+ "@typescript-eslint/naming-convention": "off",
792
914
  "@typescript-eslint/no-array-delete": "off",
793
915
  "@typescript-eslint/no-base-to-string": "off",
794
916
  "@typescript-eslint/no-confusing-void-expression": "off",
795
917
  "@typescript-eslint/no-deprecated": "off",
796
918
  "@typescript-eslint/no-duplicate-type-constituents": "off",
919
+ "@typescript-eslint/no-floating-promises": "off",
797
920
  "@typescript-eslint/no-for-in-array": "off",
798
921
  "@typescript-eslint/no-implied-eval": "off",
799
922
  "@typescript-eslint/no-meaningless-void-operator": "off",
@@ -815,6 +938,7 @@ export default [
815
938
  "@typescript-eslint/no-unsafe-enum-comparison": "off",
816
939
  "@typescript-eslint/no-unsafe-member-access": "off",
817
940
  "@typescript-eslint/no-unsafe-return": "off",
941
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
818
942
  "@typescript-eslint/no-unsafe-unary-minus": "off",
819
943
  "@typescript-eslint/no-useless-default-assignment": "off",
820
944
  "@typescript-eslint/non-nullable-type-assertion-style": "off",
@@ -825,26 +949,44 @@ export default [
825
949
  "@typescript-eslint/prefer-nullish-coalescing": "off",
826
950
  "@typescript-eslint/prefer-optional-chain": "off",
827
951
  "@typescript-eslint/prefer-promise-reject-errors": "off",
952
+ "@typescript-eslint/prefer-readonly": "off",
828
953
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
829
954
  "@typescript-eslint/prefer-reduce-type-parameter": "off",
830
955
  "@typescript-eslint/prefer-regexp-exec": "off",
831
956
  "@typescript-eslint/prefer-return-this-type": "off",
832
957
  "@typescript-eslint/prefer-string-starts-ends-with": "off",
958
+ "@typescript-eslint/promise-function-async": "off",
833
959
  "@typescript-eslint/related-getter-setter-pairs": "off",
960
+ "@typescript-eslint/require-array-sort-compare": "off",
834
961
  "@typescript-eslint/require-await": "off",
835
962
  "@typescript-eslint/restrict-plus-operands": "off",
836
963
  "@typescript-eslint/restrict-template-expressions": "off",
837
964
  "@typescript-eslint/return-await": "off",
838
965
  "@typescript-eslint/strict-boolean-expressions": "off",
839
966
  "@typescript-eslint/strict-void-return": "off",
967
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
840
968
  "@typescript-eslint/unbound-method": "off",
841
969
  "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
842
- "getter-return": "error",
970
+ "dot-notation": "off",
971
+ "no-array-constructor": "off",
843
972
  "no-dupe-args": "error",
973
+ "no-empty-function": "off",
974
+ "no-implied-eval": "off",
844
975
  "no-new-symbol": "off",
845
976
  "no-redeclare": "error",
977
+ "no-return-await": "off",
978
+ "no-shadow": "off",
979
+ "no-throw-literal": "off",
846
980
  "no-undef": "error",
847
- "no-unreachable": "error"
981
+ "no-useless-constructor": "off",
982
+ "prefer-const": [
983
+ "error",
984
+ {
985
+ "destructuring": "all"
986
+ }
987
+ ],
988
+ "prefer-promise-reject-errors": "off",
989
+ "require-await": "off"
848
990
  },
849
991
  },
850
992
 
@@ -891,8 +1033,7 @@ export default [
891
1033
  "vitest/prefer-strict-equal": "error",
892
1034
  "vitest/prefer-to-be": "error",
893
1035
  "vitest/prefer-to-have-length": "error",
894
- "vitest/require-top-level-describe": "error",
895
- "vitest/valid-title": "error"
1036
+ "vitest/require-top-level-describe": "error"
896
1037
  },
897
1038
  },
898
1039
 
@@ -1073,7 +1214,86 @@ export default [
1073
1214
  // Markdown/MDX code block linting
1074
1215
  {
1075
1216
  ...mdxPlugin.flatCodeBlocks,
1217
+ languageOptions: {
1218
+ ...mdxPlugin.flatCodeBlocks.languageOptions,
1219
+ parserOptions: {
1220
+ ...mdxPlugin.flatCodeBlocks.languageOptions?.parserOptions,
1221
+ projectService: false,
1222
+ },
1223
+ },
1076
1224
  rules: {
1225
+ ...{
1226
+ "@typescript-eslint/await-thenable": "off",
1227
+ "@typescript-eslint/consistent-type-exports": "off",
1228
+ "@typescript-eslint/dot-notation": "off",
1229
+ "@typescript-eslint/member-ordering": "off",
1230
+ "@typescript-eslint/naming-convention": "off",
1231
+ "@typescript-eslint/no-array-delete": "off",
1232
+ "@typescript-eslint/no-base-to-string": "off",
1233
+ "@typescript-eslint/no-confusing-void-expression": "off",
1234
+ "@typescript-eslint/no-deprecated": "off",
1235
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
1236
+ "@typescript-eslint/no-floating-promises": "off",
1237
+ "@typescript-eslint/no-for-in-array": "off",
1238
+ "@typescript-eslint/no-implied-eval": "off",
1239
+ "@typescript-eslint/no-meaningless-void-operator": "off",
1240
+ "@typescript-eslint/no-misused-spread": "off",
1241
+ "@typescript-eslint/no-mixed-enums": "off",
1242
+ "@typescript-eslint/no-redundant-type-constituents": "off",
1243
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1244
+ "@typescript-eslint/no-unnecessary-condition": "off",
1245
+ "@typescript-eslint/no-unnecessary-qualifier": "off",
1246
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
1247
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
1248
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
1249
+ "@typescript-eslint/no-unnecessary-type-conversion": "off",
1250
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
1251
+ "@typescript-eslint/no-unsafe-argument": "off",
1252
+ "@typescript-eslint/no-unsafe-assignment": "off",
1253
+ "@typescript-eslint/no-unsafe-call": "off",
1254
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
1255
+ "@typescript-eslint/no-unsafe-member-access": "off",
1256
+ "@typescript-eslint/no-unsafe-return": "off",
1257
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
1258
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
1259
+ "@typescript-eslint/no-useless-default-assignment": "off",
1260
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
1261
+ "@typescript-eslint/only-throw-error": "off",
1262
+ "@typescript-eslint/prefer-find": "off",
1263
+ "@typescript-eslint/prefer-includes": "off",
1264
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
1265
+ "@typescript-eslint/prefer-optional-chain": "off",
1266
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
1267
+ "@typescript-eslint/prefer-readonly": "off",
1268
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
1269
+ "@typescript-eslint/prefer-regexp-exec": "off",
1270
+ "@typescript-eslint/prefer-return-this-type": "off",
1271
+ "@typescript-eslint/prefer-string-starts-ends-with": "off",
1272
+ "@typescript-eslint/promise-function-async": "off",
1273
+ "@typescript-eslint/related-getter-setter-pairs": "off",
1274
+ "@typescript-eslint/require-array-sort-compare": "off",
1275
+ "@typescript-eslint/require-await": "off",
1276
+ "@typescript-eslint/restrict-plus-operands": "off",
1277
+ "@typescript-eslint/restrict-template-expressions": "off",
1278
+ "@typescript-eslint/return-await": "off",
1279
+ "@typescript-eslint/strict-boolean-expressions": "off",
1280
+ "@typescript-eslint/strict-void-return": "off",
1281
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1282
+ "@typescript-eslint/unbound-method": "off",
1283
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
1284
+ "dot-notation": "off",
1285
+ "no-array-constructor": "off",
1286
+ "no-empty-function": "off",
1287
+ "no-implied-eval": "off",
1288
+ "no-return-await": "off",
1289
+ "no-shadow": "off",
1290
+ "no-throw-literal": "off",
1291
+ "no-useless-constructor": "off",
1292
+ "prefer-promise-reject-errors": "off",
1293
+ "require-await": "off",
1294
+ "strict": "off",
1295
+ "unicode-bom": "off"
1296
+ },
1077
1297
  ...mdxPlugin.flatCodeBlocks.rules,
1078
1298
  "eol-last": "off",
1079
1299
  "no-undef": "off",
@@ -1086,13 +1306,15 @@ export default [
1086
1306
  },
1087
1307
 
1088
1308
  // OxLint integration — disables rules already covered by OxLint
1089
- ...[oxlintPlugin.configs["flat/recommended"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint", ...c })),
1090
- ...[oxlintPlugin.configs["flat/react"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-react", ...c })),
1091
- ...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-jsx-a11y", ...c })),
1092
- ...[oxlintPlugin.configs["flat/node"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-node", ...c })),
1093
- ...[oxlintPlugin.configs["flat/typescript"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-typescript", ...c })),
1094
- ...[oxlintPlugin.configs["flat/unicorn"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-unicorn", ...c })),
1095
- ...[oxlintPlugin.configs["flat/import"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-import", ...c })),
1096
- ...[oxlintPlugin.configs["flat/jsdoc"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-jsdoc", ...c })),
1309
+ ...[oxlintPlugin.configs["flat/recommended"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint" + (array.length > 1 ? "-" + (index + 1) : "") })),
1310
+ ...[oxlintPlugin.configs["flat/react"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react" + (array.length > 1 ? "-" + (index + 1) : "") })),
1311
+ ...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsx-a11y" + (array.length > 1 ? "-" + (index + 1) : "") })),
1312
+ ...[oxlintPlugin.configs["flat/react-hooks"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react-hooks" + (array.length > 1 ? "-" + (index + 1) : "") })),
1313
+ ...[oxlintPlugin.configs["flat/react-perf"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react-perf" + (array.length > 1 ? "-" + (index + 1) : "") })),
1314
+ ...[oxlintPlugin.configs["flat/node"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-node" + (array.length > 1 ? "-" + (index + 1) : "") })),
1315
+ ...[oxlintPlugin.configs["flat/typescript"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-typescript" + (array.length > 1 ? "-" + (index + 1) : "") })),
1316
+ ...[oxlintPlugin.configs["flat/unicorn"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-unicorn" + (array.length > 1 ? "-" + (index + 1) : "") })),
1317
+ ...[oxlintPlugin.configs["flat/import"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-import" + (array.length > 1 ? "-" + (index + 1) : "") })),
1318
+ ...[oxlintPlugin.configs["flat/jsdoc"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsdoc" + (array.length > 1 ? "-" + (index + 1) : "") })),
1097
1319
 
1098
1320
  ]