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.
@@ -10,12 +10,12 @@ import importXPlugin from "eslint-plugin-import-x"
10
10
  import jsdocPlugin from "eslint-plugin-jsdoc"
11
11
  import jsonPlugin from "@eslint/json"
12
12
  import jsxA11yPlugin from "eslint-plugin-jsx-a11y"
13
- import nodePlugin from "eslint-plugin-n"
14
13
  import packageJsonPlugin from "eslint-plugin-package-json"
15
14
  import perfectionistPlugin from "eslint-plugin-perfectionist"
16
15
  import playwrightPlugin from "eslint-plugin-playwright"
17
16
  import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
18
17
  import reactHooksPlugin from "eslint-plugin-react-hooks"
18
+ import reactPerfPlugin from "eslint-plugin-react-perf"
19
19
  import reactRefreshPlugin from "eslint-plugin-react-refresh"
20
20
  import regexpPlugin from "eslint-plugin-regexp"
21
21
  import securityPlugin from "eslint-plugin-security"
@@ -28,13 +28,99 @@ import unicornPlugin from "eslint-plugin-unicorn"
28
28
  import unusedImportsPlugin from "eslint-plugin-unused-imports"
29
29
  import vitestPlugin from "@vitest/eslint-plugin"
30
30
 
31
+ // React compat plugin — maps @eslint-react rule families into the `react/` namespace
32
+ // and aliases rules to legacy eslint-plugin-react names for OxLint compatibility.
33
+ const reactCompatPlugin = (() => {
34
+ const core = eslintReactPlugin.rules
35
+ const select = (prefix) => Object.fromEntries(
36
+ Object.entries(core)
37
+ .filter(([name]) => name.startsWith(prefix))
38
+ .map(([name, rule]) => [name.slice(prefix.length), rule]),
39
+ )
40
+ const dom = select("dom-")
41
+ const jsx = select("jsx-")
42
+ const naming = select("naming-convention-")
43
+ const rsc = select("rsc-")
44
+ const webApi = select("web-api-")
45
+
46
+ // Legacy aliases: legacy name → [source, original name]
47
+ const aliases = {
48
+ "jsx-key": [core, "no-missing-key"],
49
+ "jsx-key-before-spread": [jsx, "no-key-after-spread"],
50
+ "jsx-no-constructed-context-values": [core, "no-unstable-context-value"],
51
+ "jsx-no-leaked-render": [core, "no-leaked-conditional-rendering"],
52
+ "jsx-no-useless-fragment": [jsx, "no-useless-fragment"],
53
+ "no-object-type-as-default-prop": [core, "no-unstable-default-props"],
54
+ "no-unstable-nested-components": [core, "no-nested-component-definitions"],
55
+ "display-name": [core, "no-missing-component-display-name"],
56
+ "forward-ref-uses-ref": [core, "no-forward-ref"],
57
+ "no-did-mount-set-state": [core, "no-set-state-in-component-did-mount"],
58
+ "no-did-update-set-state": [core, "no-set-state-in-component-did-update"],
59
+ "no-will-update-set-state": [core, "no-set-state-in-component-will-update"],
60
+ "hook-use-state": [core, "use-state"],
61
+ "no-danger": [dom, "no-dangerously-set-innerhtml"],
62
+ "no-danger-with-children": [dom, "no-dangerously-set-innerhtml-with-children"],
63
+ "no-find-dom-node": [dom, "no-find-dom-node"],
64
+ "no-namespace": [jsx, "no-namespace"],
65
+ "no-render-return-value": [dom, "no-render-return-value"],
66
+ "jsx-no-script-url": [dom, "no-script-url"],
67
+ "jsx-no-target-blank": [dom, "no-unsafe-target-blank"],
68
+ "no-unknown-property": [dom, "no-unknown-property"],
69
+ "void-dom-elements-no-children": [dom, "no-void-elements-with-children"],
70
+ "button-has-type": [dom, "no-missing-button-type"],
71
+ "iframe-missing-sandbox": [dom, "no-missing-iframe-sandbox"],
72
+ "style-prop-object": [dom, "no-string-style-prop"],
73
+ }
74
+
75
+ // Identical-name aliases (core rules where legacy name = @eslint-react name)
76
+ const identicalCore = [
77
+ "no-access-state-in-setstate", "no-array-index-key",
78
+ "no-direct-mutation-state",
79
+ "no-unused-class-component-members", "no-unused-state",
80
+ ]
81
+ for (const n of identicalCore) aliases[n] = [core, n]
82
+ aliases["no-children-prop"] = [jsx, "no-children-prop"]
83
+ aliases["jsx-no-comment-textnodes"] = [jsx, "no-comment-textnodes"]
84
+
85
+ // Build aliased originals set
86
+ const aliasedCore = new Set()
87
+ for (const [src, name] of Object.values(aliases)) {
88
+ if (src === core) aliasedCore.add(name)
89
+ else if (src === dom) aliasedCore.add("dom-" + name)
90
+ else if (src === jsx) aliasedCore.add("jsx-" + name)
91
+ else if (src === naming) aliasedCore.add("naming-convention-" + name)
92
+ else if (src === rsc) aliasedCore.add("rsc-" + name)
93
+ else if (src === webApi) aliasedCore.add("web-api-" + name)
94
+ }
95
+ const rules = {}
96
+
97
+ // Core rules (skip aliased originals)
98
+ for (const [n, r] of Object.entries(core)) { if (!aliasedCore.has(n)) rules[n] = r }
99
+
100
+ // Sub-plugin rules (skip aliased + prefer-namespace-import collision)
101
+ const subs = [[dom, new Set(['prefer-namespace-import'])], [jsx], [webApi], [naming], [rsc]]
102
+ for (const [src, skip] of subs) {
103
+ for (const [n, r] of Object.entries(src)) {
104
+ if (skip && skip.has(n)) continue
105
+ if (Object.values(aliases).some(([s, o]) => s === src && o === n)) continue
106
+ rules[n] = r
107
+ }
108
+ }
109
+
110
+ // Add legacy aliases
111
+ for (const [legacy, [src, orig]] of Object.entries(aliases)) rules[legacy] = src[orig]
112
+
113
+ return { meta: { name: "react-compat", version: "1.0.0" }, rules }
114
+ })()
115
+
31
116
  export default [
32
117
  // TypeScript parser setup
33
118
  ...tseslint.configs.strictTypeChecked.slice(0, 2),
34
119
 
35
- // Base rules — all effective rules for *.ts files
120
+ // Base rules — all effective rules for TS plus shared JS/TS rules
36
121
  {
37
122
  name: "eslint-config-setup/base",
123
+ ignores: ["**/*.{md,mdx}"],
38
124
  plugins: {
39
125
  "@cspell": cspellPlugin,
40
126
  "@stylistic": stylisticPlugin,
@@ -44,13 +130,11 @@ export default [
44
130
  "import": importXPlugin,
45
131
  "jsdoc": jsdocPlugin,
46
132
  "jsx-a11y": jsxA11yPlugin,
47
- "node": nodePlugin,
48
133
  "perfectionist": perfectionistPlugin,
49
- "react": eslintReactPlugin,
50
- "react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
134
+ "react": reactCompatPlugin,
51
135
  "react-hooks": reactHooksPlugin,
136
+ "react-perf": reactPerfPlugin,
52
137
  "react-refresh": reactRefreshPlugin,
53
- "react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
54
138
  "react-you-might-not-need-an-effect": reactEffectPlugin,
55
139
  "regexp": regexpPlugin,
56
140
  "security": securityPlugin,
@@ -97,7 +181,7 @@ export default [
97
181
  "@typescript-eslint/ban-ts-comment": [
98
182
  "error",
99
183
  {
100
- "minimumDescriptionLength": 10
184
+ "ts-expect-error": "allow-with-description"
101
185
  }
102
186
  ],
103
187
  "@typescript-eslint/ban-tslint-comment": "error",
@@ -324,12 +408,7 @@ export default [
324
408
  "@typescript-eslint/no-dynamic-delete": "error",
325
409
  "@typescript-eslint/no-empty-function": "error",
326
410
  "@typescript-eslint/no-empty-object-type": "error",
327
- "@typescript-eslint/no-explicit-any": [
328
- "error",
329
- {
330
- "fixToUnknown": true
331
- }
332
- ],
411
+ "@typescript-eslint/no-explicit-any": "error",
333
412
  "@typescript-eslint/no-extra-non-null-assertion": "error",
334
413
  "@typescript-eslint/no-extraneous-class": "error",
335
414
  "@typescript-eslint/no-floating-promises": [
@@ -365,7 +444,12 @@ export default [
365
444
  ],
366
445
  "@typescript-eslint/no-meaningless-void-operator": "error",
367
446
  "@typescript-eslint/no-misused-new": "error",
368
- "@typescript-eslint/no-misused-promises": "error",
447
+ "@typescript-eslint/no-misused-promises": [
448
+ "error",
449
+ {
450
+ "checksVoidReturn": false
451
+ }
452
+ ],
369
453
  "@typescript-eslint/no-misused-spread": "error",
370
454
  "@typescript-eslint/no-mixed-enums": "error",
371
455
  "@typescript-eslint/no-namespace": "error",
@@ -533,17 +617,35 @@ export default [
533
617
  "maxDepth": 3
534
618
  }
535
619
  ],
536
- "import/no-duplicates": [
620
+ "import/no-duplicates": "error",
621
+ "import/no-empty-named-blocks": "error",
622
+ "import/no-extraneous-dependencies": [
537
623
  "error",
538
624
  {
539
- "prefer-inline": true
625
+ "includeTypes": true
540
626
  }
541
627
  ],
542
- "import/no-empty-named-blocks": "error",
543
628
  "import/no-mutable-exports": "error",
544
629
  "import/no-named-as-default": "error",
545
630
  "import/no-named-as-default-member": "error",
631
+ "import/no-named-default": "error",
546
632
  "import/no-self-import": "error",
633
+ "import/no-unassigned-import": [
634
+ "error",
635
+ {
636
+ "allow": [
637
+ "@babel/polyfill",
638
+ "**/register",
639
+ "**/register.*",
640
+ "**/register/**",
641
+ "**/register/**.*",
642
+ "**/*.css",
643
+ "**/*.scss",
644
+ "**/*.sass",
645
+ "**/*.less"
646
+ ]
647
+ }
648
+ ],
547
649
  "import/no-useless-path-segments": "error",
548
650
  "jsdoc/check-access": "error",
549
651
  "jsdoc/check-alignment": "error",
@@ -632,7 +734,7 @@ export default [
632
734
  "max-lines-per-function": [
633
735
  "error",
634
736
  {
635
- "max": 50,
737
+ "max": 100,
636
738
  "skipBlankLines": true,
637
739
  "skipComments": true
638
740
  }
@@ -681,6 +783,7 @@ export default [
681
783
  "no-fallthrough": "error",
682
784
  "no-global-assign": "error",
683
785
  "no-implicit-coercion": "error",
786
+ "no-implicit-globals": "error",
684
787
  "no-irregular-whitespace": "error",
685
788
  "no-iterator": "error",
686
789
  "no-labels": "error",
@@ -716,7 +819,12 @@ export default [
716
819
  "no-script-url": "error",
717
820
  "no-self-assign": "error",
718
821
  "no-self-compare": "error",
719
- "no-sequences": "error",
822
+ "no-sequences": [
823
+ "error",
824
+ {
825
+ "allowInParentheses": false
826
+ }
827
+ ],
720
828
  "no-shadow-restricted-names": "error",
721
829
  "no-sparse-arrays": "error",
722
830
  "no-template-curly-in-string": "error",
@@ -731,18 +839,23 @@ export default [
731
839
  "no-useless-assignment": "error",
732
840
  "no-useless-call": "error",
733
841
  "no-useless-catch": "error",
734
- "no-useless-computed-key": "error",
842
+ "no-useless-computed-key": [
843
+ "error",
844
+ {
845
+ "enforceForClassMembers": true
846
+ }
847
+ ],
735
848
  "no-useless-concat": "error",
736
849
  "no-useless-escape": "error",
737
850
  "no-useless-rename": "error",
738
851
  "no-useless-return": "error",
739
852
  "no-var": "error",
740
853
  "no-warning-comments": "warn",
741
- "node/no-unsupported-features/node-builtins": "error",
742
854
  "object-shorthand": [
743
855
  "error",
744
856
  "always",
745
857
  {
858
+ "avoidExplicitReturnArrows": true,
746
859
  "avoidQuotes": true
747
860
  }
748
861
  ],
@@ -777,14 +890,10 @@ export default [
777
890
  "allowNamedFunctions": true
778
891
  }
779
892
  ],
780
- "prefer-const": [
781
- "error",
782
- {
783
- "destructuring": "all"
784
- }
785
- ],
893
+ "prefer-const": "error",
786
894
  "prefer-exponentiation-operator": "error",
787
895
  "prefer-named-capture-group": "error",
896
+ "prefer-numeric-literals": "error",
788
897
  "prefer-object-has-own": "error",
789
898
  "prefer-object-spread": "error",
790
899
  "prefer-regex-literals": "error",
@@ -793,52 +902,113 @@ export default [
793
902
  "prefer-template": "error",
794
903
  "preserve-caught-error": "error",
795
904
  "radix": "error",
796
- "react-dom/no-dangerously-set-innerhtml": "warn",
797
- "react-dom/no-dangerously-set-innerhtml-with-children": "error",
798
- "react-dom/no-missing-button-type": "error",
799
- "react-dom/no-missing-iframe-sandbox": "error",
800
- "react-dom/no-string-style-prop": "error",
801
- "react-dom/no-unknown-property": "error",
802
- "react-dom/no-unsafe-target-blank": "error",
803
- "react-dom/no-void-elements-with-children": "error",
804
- "react-hooks/exhaustive-deps": "error",
905
+ "react-hooks/config": "error",
906
+ "react-hooks/error-boundaries": "error",
907
+ "react-hooks/exhaustive-deps": "warn",
908
+ "react-hooks/gating": "error",
909
+ "react-hooks/globals": "error",
910
+ "react-hooks/immutability": "error",
911
+ "react-hooks/incompatible-library": "warn",
912
+ "react-hooks/preserve-manual-memoization": "error",
913
+ "react-hooks/purity": "error",
914
+ "react-hooks/refs": "error",
805
915
  "react-hooks/rules-of-hooks": "error",
916
+ "react-hooks/set-state-in-effect": "error",
917
+ "react-hooks/set-state-in-render": "error",
918
+ "react-hooks/static-components": "error",
919
+ "react-hooks/unsupported-syntax": "warn",
920
+ "react-hooks/use-memo": "error",
921
+ "react-hooks/void-use-memo": "error",
922
+ "react-perf/jsx-no-jsx-as-prop": "error",
923
+ "react-perf/jsx-no-new-array-as-prop": "error",
924
+ "react-perf/jsx-no-new-function-as-prop": "error",
925
+ "react-perf/jsx-no-new-object-as-prop": "error",
806
926
  "react-refresh/only-export-components": [
807
927
  "warn",
808
928
  {
809
929
  "allowConstantExport": true
810
930
  }
811
931
  ],
812
- "react-web-api/no-leaked-event-listener": "error",
813
- "react-web-api/no-leaked-interval": "error",
814
- "react-web-api/no-leaked-resize-observer": "error",
815
- "react-web-api/no-leaked-timeout": "error",
816
932
  "react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
817
933
  "react-you-might-not-need-an-effect/no-chain-state-updates": "error",
818
934
  "react-you-might-not-need-an-effect/no-derived-state": "error",
819
- "react-you-might-not-need-an-effect/no-empty-effect": "error",
820
935
  "react-you-might-not-need-an-effect/no-event-handler": "error",
936
+ "react-you-might-not-need-an-effect/no-external-store-subscription": "error",
821
937
  "react-you-might-not-need-an-effect/no-initialize-state": "error",
822
938
  "react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
823
939
  "react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
824
940
  "react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
941
+ "react/button-has-type": "error",
942
+ "react/context-name": "warn",
943
+ "react/forward-ref-uses-ref": "error",
944
+ "react/function-definition": "error",
945
+ "react/hook-use-state": "warn",
946
+ "react/id-name": "warn",
947
+ "react/iframe-missing-sandbox": "error",
948
+ "react/jsx-key": "error",
949
+ "react/jsx-key-before-spread": "error",
950
+ "react/jsx-no-children-prop-with-children": "error",
825
951
  "react/jsx-no-comment-textnodes": "error",
826
- "react/jsx-shorthand-boolean": "error",
952
+ "react/jsx-no-constructed-context-values": "error",
953
+ "react/jsx-no-leaked-dollar": "warn",
954
+ "react/jsx-no-leaked-render": "error",
955
+ "react/jsx-no-leaked-semicolon": "warn",
956
+ "react/jsx-no-script-url": "warn",
957
+ "react/jsx-no-target-blank": "error",
958
+ "react/jsx-no-useless-fragment": "error",
827
959
  "react/no-access-state-in-setstate": "error",
828
960
  "react/no-array-index-key": "error",
961
+ "react/no-children-count": "warn",
962
+ "react/no-children-for-each": "warn",
963
+ "react/no-children-map": "warn",
964
+ "react/no-children-only": "warn",
829
965
  "react/no-children-prop": "error",
966
+ "react/no-children-to-array": "warn",
967
+ "react/no-class-component": "error",
968
+ "react/no-clone-element": "warn",
969
+ "react/no-component-will-mount": "error",
970
+ "react/no-component-will-receive-props": "error",
971
+ "react/no-component-will-update": "error",
830
972
  "react/no-context-provider": "error",
973
+ "react/no-create-ref": "error",
974
+ "react/no-danger": "warn",
975
+ "react/no-danger-with-children": "error",
976
+ "react/no-did-mount-set-state": "warn",
977
+ "react/no-did-update-set-state": "warn",
831
978
  "react/no-direct-mutation-state": "error",
832
979
  "react/no-duplicate-key": "error",
833
- "react/no-forward-ref": "error",
834
- "react/no-leaked-conditional-rendering": "error",
835
- "react/no-missing-key": "error",
836
- "react/no-nested-component-definitions": "error",
837
- "react/no-unstable-context-value": "error",
838
- "react/no-unstable-default-props": "error",
980
+ "react/no-find-dom-node": "error",
981
+ "react/no-flush-sync": "error",
982
+ "react/no-hydrate": "error",
983
+ "react/no-implicit-key": "error",
984
+ "react/no-leaked-event-listener": "error",
985
+ "react/no-leaked-fetch": "warn",
986
+ "react/no-leaked-intersection-observer": "warn",
987
+ "react/no-leaked-interval": "error",
988
+ "react/no-leaked-resize-observer": "error",
989
+ "react/no-leaked-timeout": "error",
990
+ "react/no-misused-capture-owner-stack": "error",
991
+ "react/no-namespace": "error",
992
+ "react/no-nested-lazy-component-declarations": "error",
993
+ "react/no-object-type-as-default-prop": "error",
994
+ "react/no-render": "error",
995
+ "react/no-render-return-value": "error",
996
+ "react/no-unknown-property": "error",
997
+ "react/no-unnecessary-use-prefix": "warn",
998
+ "react/no-unsafe-component-will-mount": "warn",
999
+ "react/no-unsafe-component-will-receive-props": "warn",
1000
+ "react/no-unsafe-component-will-update": "warn",
1001
+ "react/no-unsafe-iframe-sandbox": "warn",
1002
+ "react/no-unstable-nested-components": "error",
1003
+ "react/no-unused-class-component-members": "warn",
1004
+ "react/no-unused-props": "warn",
839
1005
  "react/no-unused-state": "error",
840
1006
  "react/no-use-context": "error",
841
- "react/no-useless-fragment": "error",
1007
+ "react/no-use-form-state": "error",
1008
+ "react/no-will-update-set-state": "warn",
1009
+ "react/ref-name": "warn",
1010
+ "react/style-prop-object": "error",
1011
+ "react/void-dom-elements-no-children": "error",
842
1012
  "regexp/confusing-quantifier": "warn",
843
1013
  "regexp/control-character-escape": "error",
844
1014
  "regexp/match-any": "error",
@@ -985,8 +1155,12 @@ export default [
985
1155
  {
986
1156
  "cases": {
987
1157
  "camelCase": true,
988
- "pascalCase": true
989
- }
1158
+ "pascalCase": true,
1159
+ "kebabCase": true
1160
+ },
1161
+ "ignore": [
1162
+ "__tests__"
1163
+ ]
990
1164
  }
991
1165
  ],
992
1166
  "unicorn/new-for-builtins": "error",
@@ -994,12 +1168,12 @@ export default [
994
1168
  "unicorn/no-accessor-recursion": "error",
995
1169
  "unicorn/no-anonymous-default-export": "error",
996
1170
  "unicorn/no-array-callback-reference": "error",
997
- "unicorn/no-array-for-each": "error",
998
1171
  "unicorn/no-array-method-this-argument": "error",
999
1172
  "unicorn/no-array-push-push": "error",
1000
1173
  "unicorn/no-array-reduce": "error",
1001
1174
  "unicorn/no-await-expression-member": "error",
1002
1175
  "unicorn/no-await-in-promise-methods": "error",
1176
+ "unicorn/no-for-each": "error",
1003
1177
  "unicorn/no-for-loop": "error",
1004
1178
  "unicorn/no-instanceof-builtins": "error",
1005
1179
  "unicorn/no-invalid-fetch-options": "error",
@@ -1019,7 +1193,12 @@ export default [
1019
1193
  "unicorn/no-useless-promise-resolve-reject": "error",
1020
1194
  "unicorn/no-useless-spread": "error",
1021
1195
  "unicorn/no-useless-switch-case": "error",
1022
- "unicorn/no-useless-undefined": "error",
1196
+ "unicorn/no-useless-undefined": [
1197
+ "warn",
1198
+ {
1199
+ "checkArguments": false
1200
+ }
1201
+ ],
1023
1202
  "unicorn/no-zero-fractions": "error",
1024
1203
  "unicorn/numeric-separators-style": "error",
1025
1204
  "unicorn/prefer-array-find": "error",
@@ -1030,10 +1209,11 @@ export default [
1030
1209
  "unicorn/prefer-at": "error",
1031
1210
  "unicorn/prefer-date-now": "error",
1032
1211
  "unicorn/prefer-default-parameters": "error",
1212
+ "unicorn/prefer-dom-node-dataset": "error",
1033
1213
  "unicorn/prefer-export-from": [
1034
1214
  "error",
1035
1215
  {
1036
- "ignoreUsedVariables": true
1216
+ "checkUsedVariables": false
1037
1217
  }
1038
1218
  ],
1039
1219
  "unicorn/prefer-global-this": "error",
@@ -1076,8 +1256,19 @@ export default [
1076
1256
  "unicorn/text-encoding-identifier-case": "error",
1077
1257
  "unicorn/throw-new-error": "error",
1078
1258
  "unused-imports/no-unused-imports": "error",
1079
- "use-isnan": "error",
1080
- "valid-typeof": "error",
1259
+ "use-isnan": [
1260
+ "error",
1261
+ {
1262
+ "enforceForIndexOf": true,
1263
+ "enforceForSwitchCase": true
1264
+ }
1265
+ ],
1266
+ "valid-typeof": [
1267
+ "error",
1268
+ {
1269
+ "requireStringLiterals": true
1270
+ }
1271
+ ],
1081
1272
  "yoda": "error"
1082
1273
  },
1083
1274
  },
@@ -1087,78 +1278,156 @@ export default [
1087
1278
  name: "eslint-config-setup/js-compat",
1088
1279
  files: ["**/*.{js,mjs,cjs}"],
1089
1280
  rules: {
1281
+ "@typescript-eslint/adjacent-overload-signatures": "off",
1282
+ "@typescript-eslint/array-type": "off",
1090
1283
  "@typescript-eslint/await-thenable": "off",
1284
+ "@typescript-eslint/ban-ts-comment": "off",
1285
+ "@typescript-eslint/ban-tslint-comment": "off",
1286
+ "@typescript-eslint/class-literal-property-style": "off",
1287
+ "@typescript-eslint/consistent-generic-constructors": "off",
1288
+ "@typescript-eslint/consistent-indexed-object-style": "off",
1091
1289
  "@typescript-eslint/consistent-return": "off",
1290
+ "@typescript-eslint/consistent-type-assertions": "off",
1291
+ "@typescript-eslint/consistent-type-definitions": "off",
1292
+ "@typescript-eslint/consistent-type-exports": "off",
1293
+ "@typescript-eslint/consistent-type-imports": "off",
1092
1294
  "@typescript-eslint/dot-notation": "off",
1295
+ "@typescript-eslint/explicit-function-return-type": "off",
1296
+ "@typescript-eslint/explicit-member-accessibility": "off",
1297
+ "@typescript-eslint/member-ordering": "off",
1298
+ "@typescript-eslint/method-signature-style": "off",
1299
+ "@typescript-eslint/naming-convention": "off",
1300
+ "@typescript-eslint/no-array-constructor": "off",
1093
1301
  "@typescript-eslint/no-array-delete": "off",
1094
1302
  "@typescript-eslint/no-base-to-string": "off",
1303
+ "@typescript-eslint/no-confusing-non-null-assertion": "off",
1095
1304
  "@typescript-eslint/no-confusing-void-expression": "off",
1096
1305
  "@typescript-eslint/no-deprecated": "off",
1306
+ "@typescript-eslint/no-duplicate-enum-values": "off",
1097
1307
  "@typescript-eslint/no-duplicate-type-constituents": "off",
1308
+ "@typescript-eslint/no-dynamic-delete": "off",
1309
+ "@typescript-eslint/no-empty-function": "off",
1310
+ "@typescript-eslint/no-empty-object-type": "off",
1311
+ "@typescript-eslint/no-explicit-any": "off",
1312
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
1313
+ "@typescript-eslint/no-extraneous-class": "off",
1314
+ "@typescript-eslint/no-floating-promises": "off",
1098
1315
  "@typescript-eslint/no-for-in-array": "off",
1099
1316
  "@typescript-eslint/no-implied-eval": "off",
1317
+ "@typescript-eslint/no-import-type-side-effects": "off",
1318
+ "@typescript-eslint/no-inferrable-types": "off",
1319
+ "@typescript-eslint/no-invalid-void-type": "off",
1320
+ "@typescript-eslint/no-magic-numbers": "off",
1100
1321
  "@typescript-eslint/no-meaningless-void-operator": "off",
1322
+ "@typescript-eslint/no-misused-new": "off",
1101
1323
  "@typescript-eslint/no-misused-promises": "off",
1102
1324
  "@typescript-eslint/no-misused-spread": "off",
1103
1325
  "@typescript-eslint/no-mixed-enums": "off",
1326
+ "@typescript-eslint/no-namespace": "off",
1327
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
1328
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
1329
+ "@typescript-eslint/no-non-null-assertion": "off",
1104
1330
  "@typescript-eslint/no-redundant-type-constituents": "off",
1331
+ "@typescript-eslint/no-require-imports": "off",
1332
+ "@typescript-eslint/no-shadow": "off",
1333
+ "@typescript-eslint/no-this-alias": "off",
1105
1334
  "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1106
1335
  "@typescript-eslint/no-unnecessary-condition": "off",
1336
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
1107
1337
  "@typescript-eslint/no-unnecessary-qualifier": "off",
1108
1338
  "@typescript-eslint/no-unnecessary-template-expression": "off",
1109
1339
  "@typescript-eslint/no-unnecessary-type-arguments": "off",
1110
1340
  "@typescript-eslint/no-unnecessary-type-assertion": "off",
1341
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
1111
1342
  "@typescript-eslint/no-unnecessary-type-conversion": "off",
1112
1343
  "@typescript-eslint/no-unnecessary-type-parameters": "off",
1113
1344
  "@typescript-eslint/no-unsafe-argument": "off",
1114
1345
  "@typescript-eslint/no-unsafe-assignment": "off",
1115
1346
  "@typescript-eslint/no-unsafe-call": "off",
1347
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
1116
1348
  "@typescript-eslint/no-unsafe-enum-comparison": "off",
1349
+ "@typescript-eslint/no-unsafe-function-type": "off",
1117
1350
  "@typescript-eslint/no-unsafe-member-access": "off",
1118
1351
  "@typescript-eslint/no-unsafe-return": "off",
1352
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
1119
1353
  "@typescript-eslint/no-unsafe-unary-minus": "off",
1354
+ "@typescript-eslint/no-unused-expressions": "off",
1355
+ "@typescript-eslint/no-unused-vars": "off",
1356
+ "@typescript-eslint/no-useless-constructor": "off",
1120
1357
  "@typescript-eslint/no-useless-default-assignment": "off",
1358
+ "@typescript-eslint/no-useless-empty-export": "off",
1359
+ "@typescript-eslint/no-wrapper-object-types": "off",
1121
1360
  "@typescript-eslint/non-nullable-type-assertion-style": "off",
1122
1361
  "@typescript-eslint/only-throw-error": "off",
1362
+ "@typescript-eslint/prefer-as-const": "off",
1123
1363
  "@typescript-eslint/prefer-destructuring": "off",
1364
+ "@typescript-eslint/prefer-enum-initializers": "off",
1124
1365
  "@typescript-eslint/prefer-find": "off",
1366
+ "@typescript-eslint/prefer-for-of": "off",
1367
+ "@typescript-eslint/prefer-function-type": "off",
1125
1368
  "@typescript-eslint/prefer-includes": "off",
1369
+ "@typescript-eslint/prefer-literal-enum-member": "off",
1370
+ "@typescript-eslint/prefer-namespace-keyword": "off",
1126
1371
  "@typescript-eslint/prefer-nullish-coalescing": "off",
1127
1372
  "@typescript-eslint/prefer-optional-chain": "off",
1128
1373
  "@typescript-eslint/prefer-promise-reject-errors": "off",
1374
+ "@typescript-eslint/prefer-readonly": "off",
1129
1375
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
1130
1376
  "@typescript-eslint/prefer-reduce-type-parameter": "off",
1131
1377
  "@typescript-eslint/prefer-regexp-exec": "off",
1132
1378
  "@typescript-eslint/prefer-return-this-type": "off",
1133
1379
  "@typescript-eslint/prefer-string-starts-ends-with": "off",
1380
+ "@typescript-eslint/promise-function-async": "off",
1134
1381
  "@typescript-eslint/related-getter-setter-pairs": "off",
1382
+ "@typescript-eslint/require-array-sort-compare": "off",
1135
1383
  "@typescript-eslint/require-await": "off",
1136
1384
  "@typescript-eslint/restrict-plus-operands": "off",
1137
1385
  "@typescript-eslint/restrict-template-expressions": "off",
1138
1386
  "@typescript-eslint/return-await": "off",
1139
1387
  "@typescript-eslint/strict-boolean-expressions": "off",
1140
1388
  "@typescript-eslint/strict-void-return": "off",
1389
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1390
+ "@typescript-eslint/triple-slash-reference": "off",
1141
1391
  "@typescript-eslint/unbound-method": "off",
1392
+ "@typescript-eslint/unified-signatures": "off",
1142
1393
  "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
1143
1394
  "constructor-super": "error",
1395
+ "dot-notation": "off",
1144
1396
  "getter-return": "error",
1397
+ "no-array-constructor": "off",
1145
1398
  "no-class-assign": "error",
1146
1399
  "no-const-assign": "error",
1147
1400
  "no-dupe-args": "error",
1148
1401
  "no-dupe-class-members": "error",
1149
1402
  "no-dupe-keys": "error",
1403
+ "no-empty-function": "off",
1150
1404
  "no-func-assign": "error",
1405
+ "no-implied-eval": "off",
1151
1406
  "no-import-assign": "error",
1152
1407
  "no-new-native-nonconstructor": "error",
1153
1408
  "no-new-symbol": "off",
1154
1409
  "no-obj-calls": "error",
1155
1410
  "no-redeclare": "error",
1411
+ "no-return-await": "off",
1156
1412
  "no-setter-return": "error",
1413
+ "no-shadow": "off",
1157
1414
  "no-this-before-super": "error",
1415
+ "no-throw-literal": "off",
1158
1416
  "no-undef": "error",
1159
1417
  "no-unreachable": "error",
1160
1418
  "no-unsafe-negation": "error",
1161
- "no-with": "error"
1419
+ "no-unused-expressions": "off",
1420
+ "no-unused-vars": "error",
1421
+ "no-useless-constructor": "off",
1422
+ "no-with": "error",
1423
+ "prefer-const": [
1424
+ "error",
1425
+ {
1426
+ "destructuring": "all"
1427
+ }
1428
+ ],
1429
+ "prefer-promise-reject-errors": "off",
1430
+ "require-await": "off"
1162
1431
  },
1163
1432
  },
1164
1433
 
@@ -1417,7 +1686,137 @@ export default [
1417
1686
  // Markdown/MDX code block linting
1418
1687
  {
1419
1688
  ...mdxPlugin.flatCodeBlocks,
1689
+ languageOptions: {
1690
+ ...mdxPlugin.flatCodeBlocks.languageOptions,
1691
+ parserOptions: {
1692
+ ...mdxPlugin.flatCodeBlocks.languageOptions?.parserOptions,
1693
+ projectService: false,
1694
+ },
1695
+ },
1420
1696
  rules: {
1697
+ ...{
1698
+ "@typescript-eslint/adjacent-overload-signatures": "off",
1699
+ "@typescript-eslint/array-type": "off",
1700
+ "@typescript-eslint/await-thenable": "off",
1701
+ "@typescript-eslint/ban-ts-comment": "off",
1702
+ "@typescript-eslint/ban-tslint-comment": "off",
1703
+ "@typescript-eslint/class-literal-property-style": "off",
1704
+ "@typescript-eslint/consistent-generic-constructors": "off",
1705
+ "@typescript-eslint/consistent-indexed-object-style": "off",
1706
+ "@typescript-eslint/consistent-type-assertions": "off",
1707
+ "@typescript-eslint/consistent-type-definitions": "off",
1708
+ "@typescript-eslint/consistent-type-exports": "off",
1709
+ "@typescript-eslint/consistent-type-imports": "off",
1710
+ "@typescript-eslint/dot-notation": "off",
1711
+ "@typescript-eslint/explicit-function-return-type": "off",
1712
+ "@typescript-eslint/explicit-member-accessibility": "off",
1713
+ "@typescript-eslint/member-ordering": "off",
1714
+ "@typescript-eslint/method-signature-style": "off",
1715
+ "@typescript-eslint/naming-convention": "off",
1716
+ "@typescript-eslint/no-array-constructor": "off",
1717
+ "@typescript-eslint/no-array-delete": "off",
1718
+ "@typescript-eslint/no-base-to-string": "off",
1719
+ "@typescript-eslint/no-confusing-non-null-assertion": "off",
1720
+ "@typescript-eslint/no-confusing-void-expression": "off",
1721
+ "@typescript-eslint/no-deprecated": "off",
1722
+ "@typescript-eslint/no-duplicate-enum-values": "off",
1723
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
1724
+ "@typescript-eslint/no-dynamic-delete": "off",
1725
+ "@typescript-eslint/no-empty-function": "off",
1726
+ "@typescript-eslint/no-empty-object-type": "off",
1727
+ "@typescript-eslint/no-explicit-any": "off",
1728
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
1729
+ "@typescript-eslint/no-extraneous-class": "off",
1730
+ "@typescript-eslint/no-floating-promises": "off",
1731
+ "@typescript-eslint/no-for-in-array": "off",
1732
+ "@typescript-eslint/no-implied-eval": "off",
1733
+ "@typescript-eslint/no-import-type-side-effects": "off",
1734
+ "@typescript-eslint/no-inferrable-types": "off",
1735
+ "@typescript-eslint/no-invalid-void-type": "off",
1736
+ "@typescript-eslint/no-magic-numbers": "off",
1737
+ "@typescript-eslint/no-meaningless-void-operator": "off",
1738
+ "@typescript-eslint/no-misused-new": "off",
1739
+ "@typescript-eslint/no-misused-spread": "off",
1740
+ "@typescript-eslint/no-mixed-enums": "off",
1741
+ "@typescript-eslint/no-namespace": "off",
1742
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
1743
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
1744
+ "@typescript-eslint/no-non-null-assertion": "off",
1745
+ "@typescript-eslint/no-redundant-type-constituents": "off",
1746
+ "@typescript-eslint/no-require-imports": "off",
1747
+ "@typescript-eslint/no-shadow": "off",
1748
+ "@typescript-eslint/no-this-alias": "off",
1749
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1750
+ "@typescript-eslint/no-unnecessary-condition": "off",
1751
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
1752
+ "@typescript-eslint/no-unnecessary-qualifier": "off",
1753
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
1754
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
1755
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
1756
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
1757
+ "@typescript-eslint/no-unnecessary-type-conversion": "off",
1758
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
1759
+ "@typescript-eslint/no-unsafe-argument": "off",
1760
+ "@typescript-eslint/no-unsafe-assignment": "off",
1761
+ "@typescript-eslint/no-unsafe-call": "off",
1762
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
1763
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
1764
+ "@typescript-eslint/no-unsafe-function-type": "off",
1765
+ "@typescript-eslint/no-unsafe-member-access": "off",
1766
+ "@typescript-eslint/no-unsafe-return": "off",
1767
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
1768
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
1769
+ "@typescript-eslint/no-unused-expressions": "off",
1770
+ "@typescript-eslint/no-unused-vars": "off",
1771
+ "@typescript-eslint/no-useless-constructor": "off",
1772
+ "@typescript-eslint/no-useless-default-assignment": "off",
1773
+ "@typescript-eslint/no-useless-empty-export": "off",
1774
+ "@typescript-eslint/no-wrapper-object-types": "off",
1775
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
1776
+ "@typescript-eslint/only-throw-error": "off",
1777
+ "@typescript-eslint/prefer-as-const": "off",
1778
+ "@typescript-eslint/prefer-enum-initializers": "off",
1779
+ "@typescript-eslint/prefer-find": "off",
1780
+ "@typescript-eslint/prefer-for-of": "off",
1781
+ "@typescript-eslint/prefer-function-type": "off",
1782
+ "@typescript-eslint/prefer-includes": "off",
1783
+ "@typescript-eslint/prefer-literal-enum-member": "off",
1784
+ "@typescript-eslint/prefer-namespace-keyword": "off",
1785
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
1786
+ "@typescript-eslint/prefer-optional-chain": "off",
1787
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
1788
+ "@typescript-eslint/prefer-readonly": "off",
1789
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
1790
+ "@typescript-eslint/prefer-regexp-exec": "off",
1791
+ "@typescript-eslint/prefer-return-this-type": "off",
1792
+ "@typescript-eslint/prefer-string-starts-ends-with": "off",
1793
+ "@typescript-eslint/promise-function-async": "off",
1794
+ "@typescript-eslint/related-getter-setter-pairs": "off",
1795
+ "@typescript-eslint/require-array-sort-compare": "off",
1796
+ "@typescript-eslint/require-await": "off",
1797
+ "@typescript-eslint/restrict-plus-operands": "off",
1798
+ "@typescript-eslint/restrict-template-expressions": "off",
1799
+ "@typescript-eslint/return-await": "off",
1800
+ "@typescript-eslint/strict-boolean-expressions": "off",
1801
+ "@typescript-eslint/strict-void-return": "off",
1802
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1803
+ "@typescript-eslint/triple-slash-reference": "off",
1804
+ "@typescript-eslint/unbound-method": "off",
1805
+ "@typescript-eslint/unified-signatures": "off",
1806
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
1807
+ "dot-notation": "off",
1808
+ "no-array-constructor": "off",
1809
+ "no-empty-function": "off",
1810
+ "no-implied-eval": "off",
1811
+ "no-return-await": "off",
1812
+ "no-shadow": "off",
1813
+ "no-throw-literal": "off",
1814
+ "no-useless-constructor": "off",
1815
+ "prefer-promise-reject-errors": "off",
1816
+ "require-await": "off",
1817
+ "strict": "off",
1818
+ "unicode-bom": "off"
1819
+ },
1421
1820
  ...mdxPlugin.flatCodeBlocks.rules,
1422
1821
  "eol-last": "off",
1423
1822
  "no-undef": "off",