eslint-config-setup 0.3.3 → 0.4.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.
@@ -14,7 +14,6 @@ import packageJsonPlugin from "eslint-plugin-package-json"
14
14
  import perfectionistPlugin from "eslint-plugin-perfectionist"
15
15
  import playwrightPlugin from "eslint-plugin-playwright"
16
16
  import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
17
- import reactHooksPlugin from "eslint-plugin-react-hooks"
18
17
  import reactRefreshPlugin from "eslint-plugin-react-refresh"
19
18
  import regexpPlugin from "eslint-plugin-regexp"
20
19
  import securityPlugin from "eslint-plugin-security"
@@ -27,13 +26,100 @@ 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 — merges @eslint-react sub-plugins into a single `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
+ "destructuring-assignment": [core, "prefer-destructuring-assignment"],
56
+ "no-did-mount-set-state": [core, "no-set-state-in-component-did-mount"],
57
+ "no-did-update-set-state": [core, "no-set-state-in-component-did-update"],
58
+ "no-will-update-set-state": [core, "no-set-state-in-component-will-update"],
59
+ "hook-use-state": [core, "use-state"],
60
+ "no-danger": [dom, "no-dangerously-set-innerhtml"],
61
+ "no-danger-with-children": [dom, "no-dangerously-set-innerhtml-with-children"],
62
+ "no-find-dom-node": [dom, "no-find-dom-node"],
63
+ "no-namespace": [jsx, "no-namespace"],
64
+ "no-render-return-value": [dom, "no-render-return-value"],
65
+ "jsx-no-script-url": [dom, "no-script-url"],
66
+ "jsx-no-target-blank": [dom, "no-unsafe-target-blank"],
67
+ "no-unknown-property": [dom, "no-unknown-property"],
68
+ "void-dom-elements-no-children": [dom, "no-void-elements-with-children"],
69
+ "button-has-type": [dom, "no-missing-button-type"],
70
+ "iframe-missing-sandbox": [dom, "no-missing-iframe-sandbox"],
71
+ "style-prop-object": [dom, "no-string-style-prop"],
72
+ }
73
+
74
+ // Identical-name aliases (core rules where legacy name = @eslint-react name)
75
+ const identicalCore = [
76
+ "no-access-state-in-setstate", "no-array-index-key",
77
+ "no-direct-mutation-state", "no-redundant-should-component-update",
78
+ "no-unused-class-component-members", "no-unused-state",
79
+ ]
80
+ for (const n of identicalCore) aliases[n] = [core, n]
81
+ aliases["no-children-prop"] = [jsx, "no-children-prop"]
82
+ aliases["jsx-no-comment-textnodes"] = [jsx, "no-comment-textnodes"]
83
+
84
+ // Build aliased originals set
85
+ const aliasedCore = new Set()
86
+ for (const [src, name] of Object.values(aliases)) {
87
+ if (src === core) aliasedCore.add(name)
88
+ else if (src === dom) aliasedCore.add("dom-" + name)
89
+ else if (src === jsx) aliasedCore.add("jsx-" + name)
90
+ else if (src === naming) aliasedCore.add("naming-convention-" + name)
91
+ else if (src === rsc) aliasedCore.add("rsc-" + name)
92
+ else if (src === webApi) aliasedCore.add("web-api-" + name)
93
+ }
94
+ const rules = {}
95
+
96
+ // Core rules (skip aliased originals)
97
+ for (const [n, r] of Object.entries(core)) { if (!aliasedCore.has(n)) rules[n] = r }
98
+
99
+ // Sub-plugin rules (skip aliased + prefer-namespace-import collision)
100
+ const subs = [[dom, new Set(['prefer-namespace-import'])], [jsx], [webApi], [naming], [rsc]]
101
+ for (const [src, skip] of subs) {
102
+ for (const [n, r] of Object.entries(src)) {
103
+ if (skip && skip.has(n)) continue
104
+ if (Object.values(aliases).some(([s, o]) => s === src && o === n)) continue
105
+ rules[n] = r
106
+ }
107
+ }
108
+
109
+ // Add legacy aliases
110
+ for (const [legacy, [src, orig]] of Object.entries(aliases)) rules[legacy] = src[orig]
111
+
112
+ return { meta: { name: "react-compat", version: "1.0.0" }, rules }
113
+ })()
114
+
30
115
  export default [
31
116
  // TypeScript parser setup
32
117
  ...tseslint.configs.strictTypeChecked.slice(0, 2),
33
118
 
34
- // Base rules — all effective rules for *.ts files
119
+ // Base rules — all effective rules for TS plus shared JS/TS rules
35
120
  {
36
121
  name: "eslint-config-setup/base",
122
+ ignores: ["**/*.{md,mdx}"],
37
123
  plugins: {
38
124
  "@cspell": cspellPlugin,
39
125
  "@stylistic": stylisticPlugin,
@@ -44,11 +130,8 @@ export default [
44
130
  "jsx-a11y": jsxA11yPlugin,
45
131
  "node": nodePlugin,
46
132
  "perfectionist": perfectionistPlugin,
47
- "react": eslintReactPlugin,
48
- "react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
49
- "react-hooks": reactHooksPlugin,
133
+ "react": reactCompatPlugin,
50
134
  "react-refresh": reactRefreshPlugin,
51
- "react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
52
135
  "react-you-might-not-need-an-effect": reactEffectPlugin,
53
136
  "regexp": regexpPlugin,
54
137
  "security": securityPlugin,
@@ -96,7 +179,7 @@ export default [
96
179
  "@typescript-eslint/ban-ts-comment": [
97
180
  "error",
98
181
  {
99
- "minimumDescriptionLength": 10
182
+ "ts-expect-error": "allow-with-description"
100
183
  }
101
184
  ],
102
185
  "@typescript-eslint/ban-tslint-comment": "error",
@@ -323,12 +406,7 @@ export default [
323
406
  "@typescript-eslint/no-dynamic-delete": "error",
324
407
  "@typescript-eslint/no-empty-function": "error",
325
408
  "@typescript-eslint/no-empty-object-type": "error",
326
- "@typescript-eslint/no-explicit-any": [
327
- "error",
328
- {
329
- "fixToUnknown": true
330
- }
331
- ],
409
+ "@typescript-eslint/no-explicit-any": "error",
332
410
  "@typescript-eslint/no-extra-non-null-assertion": "error",
333
411
  "@typescript-eslint/no-extraneous-class": "error",
334
412
  "@typescript-eslint/no-floating-promises": [
@@ -364,7 +442,12 @@ export default [
364
442
  ],
365
443
  "@typescript-eslint/no-meaningless-void-operator": "error",
366
444
  "@typescript-eslint/no-misused-new": "error",
367
- "@typescript-eslint/no-misused-promises": "error",
445
+ "@typescript-eslint/no-misused-promises": [
446
+ "error",
447
+ {
448
+ "checksVoidReturn": false
449
+ }
450
+ ],
368
451
  "@typescript-eslint/no-misused-spread": "error",
369
452
  "@typescript-eslint/no-mixed-enums": "error",
370
453
  "@typescript-eslint/no-namespace": "error",
@@ -531,17 +614,35 @@ export default [
531
614
  "maxDepth": 3
532
615
  }
533
616
  ],
534
- "import/no-duplicates": [
617
+ "import/no-duplicates": "error",
618
+ "import/no-empty-named-blocks": "error",
619
+ "import/no-extraneous-dependencies": [
535
620
  "error",
536
621
  {
537
- "prefer-inline": true
622
+ "includeTypes": true
538
623
  }
539
624
  ],
540
- "import/no-empty-named-blocks": "error",
541
625
  "import/no-mutable-exports": "error",
542
626
  "import/no-named-as-default": "error",
543
627
  "import/no-named-as-default-member": "error",
628
+ "import/no-named-default": "error",
544
629
  "import/no-self-import": "error",
630
+ "import/no-unassigned-import": [
631
+ "error",
632
+ {
633
+ "allow": [
634
+ "@babel/polyfill",
635
+ "**/register",
636
+ "**/register.*",
637
+ "**/register/**",
638
+ "**/register/**.*",
639
+ "**/*.css",
640
+ "**/*.scss",
641
+ "**/*.sass",
642
+ "**/*.less"
643
+ ]
644
+ }
645
+ ],
545
646
  "import/no-useless-path-segments": "error",
546
647
  "jsdoc/check-access": "error",
547
648
  "jsdoc/check-alignment": "error",
@@ -630,7 +731,7 @@ export default [
630
731
  "max-lines-per-function": [
631
732
  "error",
632
733
  {
633
- "max": 50,
734
+ "max": 100,
634
735
  "skipBlankLines": true,
635
736
  "skipComments": true
636
737
  }
@@ -679,6 +780,7 @@ export default [
679
780
  "no-fallthrough": "error",
680
781
  "no-global-assign": "error",
681
782
  "no-implicit-coercion": "error",
783
+ "no-implicit-globals": "error",
682
784
  "no-irregular-whitespace": "error",
683
785
  "no-iterator": "error",
684
786
  "no-labels": "error",
@@ -714,7 +816,12 @@ export default [
714
816
  "no-script-url": "error",
715
817
  "no-self-assign": "error",
716
818
  "no-self-compare": "error",
717
- "no-sequences": "error",
819
+ "no-sequences": [
820
+ "error",
821
+ {
822
+ "allowInParentheses": false
823
+ }
824
+ ],
718
825
  "no-shadow-restricted-names": "error",
719
826
  "no-sparse-arrays": "error",
720
827
  "no-template-curly-in-string": "error",
@@ -729,13 +836,19 @@ export default [
729
836
  "no-useless-assignment": "error",
730
837
  "no-useless-call": "error",
731
838
  "no-useless-catch": "error",
732
- "no-useless-computed-key": "error",
839
+ "no-useless-computed-key": [
840
+ "error",
841
+ {
842
+ "enforceForClassMembers": true
843
+ }
844
+ ],
733
845
  "no-useless-concat": "error",
734
846
  "no-useless-escape": "error",
735
847
  "no-useless-rename": "error",
736
848
  "no-useless-return": "error",
737
849
  "no-var": "error",
738
850
  "no-warning-comments": "warn",
851
+ "node/handle-callback-err": "error",
739
852
  "node/hashbang": "error",
740
853
  "node/no-deprecated-api": "error",
741
854
  "node/no-exports-assign": "error",
@@ -764,10 +877,12 @@ export default [
764
877
  ],
765
878
  "node/prefer-promises/dns": "error",
766
879
  "node/prefer-promises/fs": "error",
880
+ "node/process-exit-as-throw": "error",
767
881
  "object-shorthand": [
768
882
  "error",
769
883
  "always",
770
884
  {
885
+ "avoidExplicitReturnArrows": true,
771
886
  "avoidQuotes": true
772
887
  }
773
888
  ],
@@ -802,14 +917,10 @@ export default [
802
917
  "allowNamedFunctions": true
803
918
  }
804
919
  ],
805
- "prefer-const": [
806
- "error",
807
- {
808
- "destructuring": "all"
809
- }
810
- ],
920
+ "prefer-const": "error",
811
921
  "prefer-exponentiation-operator": "error",
812
922
  "prefer-named-capture-group": "error",
923
+ "prefer-numeric-literals": "error",
813
924
  "prefer-object-has-own": "error",
814
925
  "prefer-object-spread": "error",
815
926
  "prefer-regex-literals": "error",
@@ -818,26 +929,12 @@ export default [
818
929
  "prefer-template": "error",
819
930
  "preserve-caught-error": "error",
820
931
  "radix": "error",
821
- "react-dom/no-dangerously-set-innerhtml": "warn",
822
- "react-dom/no-dangerously-set-innerhtml-with-children": "error",
823
- "react-dom/no-missing-button-type": "error",
824
- "react-dom/no-missing-iframe-sandbox": "error",
825
- "react-dom/no-string-style-prop": "error",
826
- "react-dom/no-unknown-property": "error",
827
- "react-dom/no-unsafe-target-blank": "error",
828
- "react-dom/no-void-elements-with-children": "error",
829
- "react-hooks/exhaustive-deps": "error",
830
- "react-hooks/rules-of-hooks": "error",
831
932
  "react-refresh/only-export-components": [
832
933
  "warn",
833
934
  {
834
935
  "allowConstantExport": true
835
936
  }
836
937
  ],
837
- "react-web-api/no-leaked-event-listener": "error",
838
- "react-web-api/no-leaked-interval": "error",
839
- "react-web-api/no-leaked-resize-observer": "error",
840
- "react-web-api/no-leaked-timeout": "error",
841
938
  "react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
842
939
  "react-you-might-not-need-an-effect/no-chain-state-updates": "error",
843
940
  "react-you-might-not-need-an-effect/no-derived-state": "error",
@@ -847,23 +944,87 @@ export default [
847
944
  "react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
848
945
  "react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
849
946
  "react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
947
+ "react/button-has-type": "error",
948
+ "react/component-hook-factories": "error",
949
+ "react/context-name": "warn",
950
+ "react/destructuring-assignment": "warn",
951
+ "react/error-boundaries": "error",
952
+ "react/exhaustive-deps": "warn",
953
+ "react/forward-ref-uses-ref": "error",
954
+ "react/function-definition": "error",
955
+ "react/hook-use-state": "warn",
956
+ "react/id-name": "warn",
957
+ "react/iframe-missing-sandbox": "error",
958
+ "react/jsx-key": "error",
959
+ "react/jsx-key-before-spread": "error",
960
+ "react/jsx-no-children-prop-with-children": "error",
850
961
  "react/jsx-no-comment-textnodes": "error",
851
- "react/jsx-shorthand-boolean": "error",
962
+ "react/jsx-no-constructed-context-values": "error",
963
+ "react/jsx-no-leaked-render": "error",
964
+ "react/jsx-no-leaked-semicolon": "warn",
965
+ "react/jsx-no-script-url": "warn",
966
+ "react/jsx-no-target-blank": "error",
967
+ "react/jsx-no-useless-fragment": "error",
852
968
  "react/no-access-state-in-setstate": "error",
853
969
  "react/no-array-index-key": "error",
970
+ "react/no-children-count": "warn",
971
+ "react/no-children-for-each": "warn",
972
+ "react/no-children-map": "warn",
973
+ "react/no-children-only": "warn",
854
974
  "react/no-children-prop": "error",
975
+ "react/no-children-to-array": "warn",
976
+ "react/no-class-component": "error",
977
+ "react/no-clone-element": "warn",
978
+ "react/no-component-will-mount": "error",
979
+ "react/no-component-will-receive-props": "error",
980
+ "react/no-component-will-update": "error",
855
981
  "react/no-context-provider": "error",
982
+ "react/no-create-ref": "error",
983
+ "react/no-danger": "warn",
984
+ "react/no-danger-with-children": "error",
985
+ "react/no-did-mount-set-state": "warn",
986
+ "react/no-did-update-set-state": "warn",
856
987
  "react/no-direct-mutation-state": "error",
857
988
  "react/no-duplicate-key": "error",
858
- "react/no-forward-ref": "error",
859
- "react/no-leaked-conditional-rendering": "error",
860
- "react/no-missing-key": "error",
861
- "react/no-nested-component-definitions": "error",
862
- "react/no-unstable-context-value": "error",
863
- "react/no-unstable-default-props": "error",
989
+ "react/no-find-dom-node": "error",
990
+ "react/no-flush-sync": "error",
991
+ "react/no-hydrate": "error",
992
+ "react/no-implicit-key": "error",
993
+ "react/no-leaked-event-listener": "error",
994
+ "react/no-leaked-interval": "error",
995
+ "react/no-leaked-resize-observer": "error",
996
+ "react/no-leaked-timeout": "error",
997
+ "react/no-misused-capture-owner-stack": "error",
998
+ "react/no-namespace": "error",
999
+ "react/no-nested-lazy-component-declarations": "error",
1000
+ "react/no-object-type-as-default-prop": "error",
1001
+ "react/no-redundant-should-component-update": "error",
1002
+ "react/no-render": "error",
1003
+ "react/no-render-return-value": "error",
1004
+ "react/no-unknown-property": "error",
1005
+ "react/no-unnecessary-use-callback": "warn",
1006
+ "react/no-unnecessary-use-memo": "warn",
1007
+ "react/no-unnecessary-use-prefix": "warn",
1008
+ "react/no-unsafe-component-will-mount": "warn",
1009
+ "react/no-unsafe-component-will-receive-props": "warn",
1010
+ "react/no-unsafe-component-will-update": "warn",
1011
+ "react/no-unsafe-iframe-sandbox": "warn",
1012
+ "react/no-unstable-nested-components": "error",
1013
+ "react/no-unused-class-component-members": "warn",
1014
+ "react/no-unused-props": "warn",
864
1015
  "react/no-unused-state": "error",
865
1016
  "react/no-use-context": "error",
866
- "react/no-useless-fragment": "error",
1017
+ "react/no-use-form-state": "error",
1018
+ "react/no-will-update-set-state": "warn",
1019
+ "react/purity": "warn",
1020
+ "react/ref-name": "warn",
1021
+ "react/rules-of-hooks": "error",
1022
+ "react/set-state-in-effect": "warn",
1023
+ "react/set-state-in-render": "error",
1024
+ "react/style-prop-object": "error",
1025
+ "react/unsupported-syntax": "error",
1026
+ "react/use-memo": "error",
1027
+ "react/void-dom-elements-no-children": "error",
867
1028
  "regexp/confusing-quantifier": "warn",
868
1029
  "regexp/control-character-escape": "error",
869
1030
  "regexp/match-any": "error",
@@ -1010,7 +1171,8 @@ export default [
1010
1171
  {
1011
1172
  "cases": {
1012
1173
  "camelCase": true,
1013
- "pascalCase": true
1174
+ "pascalCase": true,
1175
+ "kebabCase": true
1014
1176
  }
1015
1177
  }
1016
1178
  ],
@@ -1044,7 +1206,12 @@ export default [
1044
1206
  "unicorn/no-useless-promise-resolve-reject": "error",
1045
1207
  "unicorn/no-useless-spread": "error",
1046
1208
  "unicorn/no-useless-switch-case": "error",
1047
- "unicorn/no-useless-undefined": "error",
1209
+ "unicorn/no-useless-undefined": [
1210
+ "warn",
1211
+ {
1212
+ "checkArguments": false
1213
+ }
1214
+ ],
1048
1215
  "unicorn/no-zero-fractions": "error",
1049
1216
  "unicorn/numeric-separators-style": "error",
1050
1217
  "unicorn/prefer-array-find": "error",
@@ -1055,6 +1222,7 @@ export default [
1055
1222
  "unicorn/prefer-at": "error",
1056
1223
  "unicorn/prefer-date-now": "error",
1057
1224
  "unicorn/prefer-default-parameters": "error",
1225
+ "unicorn/prefer-dom-node-dataset": "error",
1058
1226
  "unicorn/prefer-export-from": [
1059
1227
  "error",
1060
1228
  {
@@ -1101,8 +1269,19 @@ export default [
1101
1269
  "unicorn/text-encoding-identifier-case": "error",
1102
1270
  "unicorn/throw-new-error": "error",
1103
1271
  "unused-imports/no-unused-imports": "error",
1104
- "use-isnan": "error",
1105
- "valid-typeof": "error",
1272
+ "use-isnan": [
1273
+ "error",
1274
+ {
1275
+ "enforceForIndexOf": true,
1276
+ "enforceForSwitchCase": true
1277
+ }
1278
+ ],
1279
+ "valid-typeof": [
1280
+ "error",
1281
+ {
1282
+ "requireStringLiterals": true
1283
+ }
1284
+ ],
1106
1285
  "yoda": "error"
1107
1286
  },
1108
1287
  },
@@ -1112,78 +1291,156 @@ export default [
1112
1291
  name: "eslint-config-setup/js-compat",
1113
1292
  files: ["**/*.{js,mjs,cjs}"],
1114
1293
  rules: {
1294
+ "@typescript-eslint/adjacent-overload-signatures": "off",
1295
+ "@typescript-eslint/array-type": "off",
1115
1296
  "@typescript-eslint/await-thenable": "off",
1297
+ "@typescript-eslint/ban-ts-comment": "off",
1298
+ "@typescript-eslint/ban-tslint-comment": "off",
1299
+ "@typescript-eslint/class-literal-property-style": "off",
1300
+ "@typescript-eslint/consistent-generic-constructors": "off",
1301
+ "@typescript-eslint/consistent-indexed-object-style": "off",
1116
1302
  "@typescript-eslint/consistent-return": "off",
1303
+ "@typescript-eslint/consistent-type-assertions": "off",
1304
+ "@typescript-eslint/consistent-type-definitions": "off",
1305
+ "@typescript-eslint/consistent-type-exports": "off",
1306
+ "@typescript-eslint/consistent-type-imports": "off",
1117
1307
  "@typescript-eslint/dot-notation": "off",
1308
+ "@typescript-eslint/explicit-function-return-type": "off",
1309
+ "@typescript-eslint/explicit-member-accessibility": "off",
1310
+ "@typescript-eslint/member-ordering": "off",
1311
+ "@typescript-eslint/method-signature-style": "off",
1312
+ "@typescript-eslint/naming-convention": "off",
1313
+ "@typescript-eslint/no-array-constructor": "off",
1118
1314
  "@typescript-eslint/no-array-delete": "off",
1119
1315
  "@typescript-eslint/no-base-to-string": "off",
1316
+ "@typescript-eslint/no-confusing-non-null-assertion": "off",
1120
1317
  "@typescript-eslint/no-confusing-void-expression": "off",
1121
1318
  "@typescript-eslint/no-deprecated": "off",
1319
+ "@typescript-eslint/no-duplicate-enum-values": "off",
1122
1320
  "@typescript-eslint/no-duplicate-type-constituents": "off",
1321
+ "@typescript-eslint/no-dynamic-delete": "off",
1322
+ "@typescript-eslint/no-empty-function": "off",
1323
+ "@typescript-eslint/no-empty-object-type": "off",
1324
+ "@typescript-eslint/no-explicit-any": "off",
1325
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
1326
+ "@typescript-eslint/no-extraneous-class": "off",
1327
+ "@typescript-eslint/no-floating-promises": "off",
1123
1328
  "@typescript-eslint/no-for-in-array": "off",
1124
1329
  "@typescript-eslint/no-implied-eval": "off",
1330
+ "@typescript-eslint/no-import-type-side-effects": "off",
1331
+ "@typescript-eslint/no-inferrable-types": "off",
1332
+ "@typescript-eslint/no-invalid-void-type": "off",
1333
+ "@typescript-eslint/no-magic-numbers": "off",
1125
1334
  "@typescript-eslint/no-meaningless-void-operator": "off",
1335
+ "@typescript-eslint/no-misused-new": "off",
1126
1336
  "@typescript-eslint/no-misused-promises": "off",
1127
1337
  "@typescript-eslint/no-misused-spread": "off",
1128
1338
  "@typescript-eslint/no-mixed-enums": "off",
1339
+ "@typescript-eslint/no-namespace": "off",
1340
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
1341
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
1342
+ "@typescript-eslint/no-non-null-assertion": "off",
1129
1343
  "@typescript-eslint/no-redundant-type-constituents": "off",
1344
+ "@typescript-eslint/no-require-imports": "off",
1345
+ "@typescript-eslint/no-shadow": "off",
1346
+ "@typescript-eslint/no-this-alias": "off",
1130
1347
  "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1131
1348
  "@typescript-eslint/no-unnecessary-condition": "off",
1349
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
1132
1350
  "@typescript-eslint/no-unnecessary-qualifier": "off",
1133
1351
  "@typescript-eslint/no-unnecessary-template-expression": "off",
1134
1352
  "@typescript-eslint/no-unnecessary-type-arguments": "off",
1135
1353
  "@typescript-eslint/no-unnecessary-type-assertion": "off",
1354
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
1136
1355
  "@typescript-eslint/no-unnecessary-type-conversion": "off",
1137
1356
  "@typescript-eslint/no-unnecessary-type-parameters": "off",
1138
1357
  "@typescript-eslint/no-unsafe-argument": "off",
1139
1358
  "@typescript-eslint/no-unsafe-assignment": "off",
1140
1359
  "@typescript-eslint/no-unsafe-call": "off",
1360
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
1141
1361
  "@typescript-eslint/no-unsafe-enum-comparison": "off",
1362
+ "@typescript-eslint/no-unsafe-function-type": "off",
1142
1363
  "@typescript-eslint/no-unsafe-member-access": "off",
1143
1364
  "@typescript-eslint/no-unsafe-return": "off",
1365
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
1144
1366
  "@typescript-eslint/no-unsafe-unary-minus": "off",
1367
+ "@typescript-eslint/no-unused-expressions": "off",
1368
+ "@typescript-eslint/no-unused-vars": "off",
1369
+ "@typescript-eslint/no-useless-constructor": "off",
1145
1370
  "@typescript-eslint/no-useless-default-assignment": "off",
1371
+ "@typescript-eslint/no-useless-empty-export": "off",
1372
+ "@typescript-eslint/no-wrapper-object-types": "off",
1146
1373
  "@typescript-eslint/non-nullable-type-assertion-style": "off",
1147
1374
  "@typescript-eslint/only-throw-error": "off",
1375
+ "@typescript-eslint/prefer-as-const": "off",
1148
1376
  "@typescript-eslint/prefer-destructuring": "off",
1377
+ "@typescript-eslint/prefer-enum-initializers": "off",
1149
1378
  "@typescript-eslint/prefer-find": "off",
1379
+ "@typescript-eslint/prefer-for-of": "off",
1380
+ "@typescript-eslint/prefer-function-type": "off",
1150
1381
  "@typescript-eslint/prefer-includes": "off",
1382
+ "@typescript-eslint/prefer-literal-enum-member": "off",
1383
+ "@typescript-eslint/prefer-namespace-keyword": "off",
1151
1384
  "@typescript-eslint/prefer-nullish-coalescing": "off",
1152
1385
  "@typescript-eslint/prefer-optional-chain": "off",
1153
1386
  "@typescript-eslint/prefer-promise-reject-errors": "off",
1387
+ "@typescript-eslint/prefer-readonly": "off",
1154
1388
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
1155
1389
  "@typescript-eslint/prefer-reduce-type-parameter": "off",
1156
1390
  "@typescript-eslint/prefer-regexp-exec": "off",
1157
1391
  "@typescript-eslint/prefer-return-this-type": "off",
1158
1392
  "@typescript-eslint/prefer-string-starts-ends-with": "off",
1393
+ "@typescript-eslint/promise-function-async": "off",
1159
1394
  "@typescript-eslint/related-getter-setter-pairs": "off",
1395
+ "@typescript-eslint/require-array-sort-compare": "off",
1160
1396
  "@typescript-eslint/require-await": "off",
1161
1397
  "@typescript-eslint/restrict-plus-operands": "off",
1162
1398
  "@typescript-eslint/restrict-template-expressions": "off",
1163
1399
  "@typescript-eslint/return-await": "off",
1164
1400
  "@typescript-eslint/strict-boolean-expressions": "off",
1165
1401
  "@typescript-eslint/strict-void-return": "off",
1402
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1403
+ "@typescript-eslint/triple-slash-reference": "off",
1166
1404
  "@typescript-eslint/unbound-method": "off",
1405
+ "@typescript-eslint/unified-signatures": "off",
1167
1406
  "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
1168
1407
  "constructor-super": "error",
1408
+ "dot-notation": "off",
1169
1409
  "getter-return": "error",
1410
+ "no-array-constructor": "off",
1170
1411
  "no-class-assign": "error",
1171
1412
  "no-const-assign": "error",
1172
1413
  "no-dupe-args": "error",
1173
1414
  "no-dupe-class-members": "error",
1174
1415
  "no-dupe-keys": "error",
1416
+ "no-empty-function": "off",
1175
1417
  "no-func-assign": "error",
1418
+ "no-implied-eval": "off",
1176
1419
  "no-import-assign": "error",
1177
1420
  "no-new-native-nonconstructor": "error",
1178
1421
  "no-new-symbol": "off",
1179
1422
  "no-obj-calls": "error",
1180
1423
  "no-redeclare": "error",
1424
+ "no-return-await": "off",
1181
1425
  "no-setter-return": "error",
1426
+ "no-shadow": "off",
1182
1427
  "no-this-before-super": "error",
1428
+ "no-throw-literal": "off",
1183
1429
  "no-undef": "error",
1184
1430
  "no-unreachable": "error",
1185
1431
  "no-unsafe-negation": "error",
1186
- "no-with": "error"
1432
+ "no-unused-expressions": "off",
1433
+ "no-unused-vars": "error",
1434
+ "no-useless-constructor": "off",
1435
+ "no-with": "error",
1436
+ "prefer-const": [
1437
+ "error",
1438
+ {
1439
+ "destructuring": "all"
1440
+ }
1441
+ ],
1442
+ "prefer-promise-reject-errors": "off",
1443
+ "require-await": "off"
1187
1444
  },
1188
1445
  },
1189
1446
 
@@ -1442,7 +1699,137 @@ export default [
1442
1699
  // Markdown/MDX code block linting
1443
1700
  {
1444
1701
  ...mdxPlugin.flatCodeBlocks,
1702
+ languageOptions: {
1703
+ ...mdxPlugin.flatCodeBlocks.languageOptions,
1704
+ parserOptions: {
1705
+ ...mdxPlugin.flatCodeBlocks.languageOptions?.parserOptions,
1706
+ projectService: false,
1707
+ },
1708
+ },
1445
1709
  rules: {
1710
+ ...{
1711
+ "@typescript-eslint/adjacent-overload-signatures": "off",
1712
+ "@typescript-eslint/array-type": "off",
1713
+ "@typescript-eslint/await-thenable": "off",
1714
+ "@typescript-eslint/ban-ts-comment": "off",
1715
+ "@typescript-eslint/ban-tslint-comment": "off",
1716
+ "@typescript-eslint/class-literal-property-style": "off",
1717
+ "@typescript-eslint/consistent-generic-constructors": "off",
1718
+ "@typescript-eslint/consistent-indexed-object-style": "off",
1719
+ "@typescript-eslint/consistent-type-assertions": "off",
1720
+ "@typescript-eslint/consistent-type-definitions": "off",
1721
+ "@typescript-eslint/consistent-type-exports": "off",
1722
+ "@typescript-eslint/consistent-type-imports": "off",
1723
+ "@typescript-eslint/dot-notation": "off",
1724
+ "@typescript-eslint/explicit-function-return-type": "off",
1725
+ "@typescript-eslint/explicit-member-accessibility": "off",
1726
+ "@typescript-eslint/member-ordering": "off",
1727
+ "@typescript-eslint/method-signature-style": "off",
1728
+ "@typescript-eslint/naming-convention": "off",
1729
+ "@typescript-eslint/no-array-constructor": "off",
1730
+ "@typescript-eslint/no-array-delete": "off",
1731
+ "@typescript-eslint/no-base-to-string": "off",
1732
+ "@typescript-eslint/no-confusing-non-null-assertion": "off",
1733
+ "@typescript-eslint/no-confusing-void-expression": "off",
1734
+ "@typescript-eslint/no-deprecated": "off",
1735
+ "@typescript-eslint/no-duplicate-enum-values": "off",
1736
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
1737
+ "@typescript-eslint/no-dynamic-delete": "off",
1738
+ "@typescript-eslint/no-empty-function": "off",
1739
+ "@typescript-eslint/no-empty-object-type": "off",
1740
+ "@typescript-eslint/no-explicit-any": "off",
1741
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
1742
+ "@typescript-eslint/no-extraneous-class": "off",
1743
+ "@typescript-eslint/no-floating-promises": "off",
1744
+ "@typescript-eslint/no-for-in-array": "off",
1745
+ "@typescript-eslint/no-implied-eval": "off",
1746
+ "@typescript-eslint/no-import-type-side-effects": "off",
1747
+ "@typescript-eslint/no-inferrable-types": "off",
1748
+ "@typescript-eslint/no-invalid-void-type": "off",
1749
+ "@typescript-eslint/no-magic-numbers": "off",
1750
+ "@typescript-eslint/no-meaningless-void-operator": "off",
1751
+ "@typescript-eslint/no-misused-new": "off",
1752
+ "@typescript-eslint/no-misused-spread": "off",
1753
+ "@typescript-eslint/no-mixed-enums": "off",
1754
+ "@typescript-eslint/no-namespace": "off",
1755
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
1756
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
1757
+ "@typescript-eslint/no-non-null-assertion": "off",
1758
+ "@typescript-eslint/no-redundant-type-constituents": "off",
1759
+ "@typescript-eslint/no-require-imports": "off",
1760
+ "@typescript-eslint/no-shadow": "off",
1761
+ "@typescript-eslint/no-this-alias": "off",
1762
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1763
+ "@typescript-eslint/no-unnecessary-condition": "off",
1764
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
1765
+ "@typescript-eslint/no-unnecessary-qualifier": "off",
1766
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
1767
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
1768
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
1769
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
1770
+ "@typescript-eslint/no-unnecessary-type-conversion": "off",
1771
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
1772
+ "@typescript-eslint/no-unsafe-argument": "off",
1773
+ "@typescript-eslint/no-unsafe-assignment": "off",
1774
+ "@typescript-eslint/no-unsafe-call": "off",
1775
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
1776
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
1777
+ "@typescript-eslint/no-unsafe-function-type": "off",
1778
+ "@typescript-eslint/no-unsafe-member-access": "off",
1779
+ "@typescript-eslint/no-unsafe-return": "off",
1780
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
1781
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
1782
+ "@typescript-eslint/no-unused-expressions": "off",
1783
+ "@typescript-eslint/no-unused-vars": "off",
1784
+ "@typescript-eslint/no-useless-constructor": "off",
1785
+ "@typescript-eslint/no-useless-default-assignment": "off",
1786
+ "@typescript-eslint/no-useless-empty-export": "off",
1787
+ "@typescript-eslint/no-wrapper-object-types": "off",
1788
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
1789
+ "@typescript-eslint/only-throw-error": "off",
1790
+ "@typescript-eslint/prefer-as-const": "off",
1791
+ "@typescript-eslint/prefer-enum-initializers": "off",
1792
+ "@typescript-eslint/prefer-find": "off",
1793
+ "@typescript-eslint/prefer-for-of": "off",
1794
+ "@typescript-eslint/prefer-function-type": "off",
1795
+ "@typescript-eslint/prefer-includes": "off",
1796
+ "@typescript-eslint/prefer-literal-enum-member": "off",
1797
+ "@typescript-eslint/prefer-namespace-keyword": "off",
1798
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
1799
+ "@typescript-eslint/prefer-optional-chain": "off",
1800
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
1801
+ "@typescript-eslint/prefer-readonly": "off",
1802
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
1803
+ "@typescript-eslint/prefer-regexp-exec": "off",
1804
+ "@typescript-eslint/prefer-return-this-type": "off",
1805
+ "@typescript-eslint/prefer-string-starts-ends-with": "off",
1806
+ "@typescript-eslint/promise-function-async": "off",
1807
+ "@typescript-eslint/related-getter-setter-pairs": "off",
1808
+ "@typescript-eslint/require-array-sort-compare": "off",
1809
+ "@typescript-eslint/require-await": "off",
1810
+ "@typescript-eslint/restrict-plus-operands": "off",
1811
+ "@typescript-eslint/restrict-template-expressions": "off",
1812
+ "@typescript-eslint/return-await": "off",
1813
+ "@typescript-eslint/strict-boolean-expressions": "off",
1814
+ "@typescript-eslint/strict-void-return": "off",
1815
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1816
+ "@typescript-eslint/triple-slash-reference": "off",
1817
+ "@typescript-eslint/unbound-method": "off",
1818
+ "@typescript-eslint/unified-signatures": "off",
1819
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
1820
+ "dot-notation": "off",
1821
+ "no-array-constructor": "off",
1822
+ "no-empty-function": "off",
1823
+ "no-implied-eval": "off",
1824
+ "no-return-await": "off",
1825
+ "no-shadow": "off",
1826
+ "no-throw-literal": "off",
1827
+ "no-useless-constructor": "off",
1828
+ "prefer-promise-reject-errors": "off",
1829
+ "require-await": "off",
1830
+ "strict": "off",
1831
+ "unicode-bom": "off"
1832
+ },
1446
1833
  ...mdxPlugin.flatCodeBlocks.rules,
1447
1834
  "eol-last": "off",
1448
1835
  "no-undef": "off",