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.
@@ -10,12 +10,10 @@ 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
- import reactHooksPlugin from "eslint-plugin-react-hooks"
19
17
  import reactRefreshPlugin from "eslint-plugin-react-refresh"
20
18
  import regexpPlugin from "eslint-plugin-regexp"
21
19
  import securityPlugin from "eslint-plugin-security"
@@ -28,13 +26,100 @@ import unicornPlugin from "eslint-plugin-unicorn"
28
26
  import unusedImportsPlugin from "eslint-plugin-unused-imports"
29
27
  import vitestPlugin from "@vitest/eslint-plugin"
30
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
+
31
115
  export default [
32
116
  // TypeScript parser setup
33
117
  ...tseslint.configs.strictTypeChecked.slice(0, 2),
34
118
 
35
- // Base rules — all effective rules for *.ts files
119
+ // Base rules — all effective rules for TS plus shared JS/TS rules
36
120
  {
37
121
  name: "eslint-config-setup/base",
122
+ ignores: ["**/*.{md,mdx}"],
38
123
  plugins: {
39
124
  "@cspell": cspellPlugin,
40
125
  "@stylistic": stylisticPlugin,
@@ -44,13 +129,9 @@ export default [
44
129
  "import": importXPlugin,
45
130
  "jsdoc": jsdocPlugin,
46
131
  "jsx-a11y": jsxA11yPlugin,
47
- "node": nodePlugin,
48
132
  "perfectionist": perfectionistPlugin,
49
- "react": eslintReactPlugin,
50
- "react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
51
- "react-hooks": reactHooksPlugin,
133
+ "react": reactCompatPlugin,
52
134
  "react-refresh": reactRefreshPlugin,
53
- "react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
54
135
  "react-you-might-not-need-an-effect": reactEffectPlugin,
55
136
  "regexp": regexpPlugin,
56
137
  "security": securityPlugin,
@@ -97,7 +178,7 @@ export default [
97
178
  "@typescript-eslint/ban-ts-comment": [
98
179
  "error",
99
180
  {
100
- "minimumDescriptionLength": 10
181
+ "ts-expect-error": "allow-with-description"
101
182
  }
102
183
  ],
103
184
  "@typescript-eslint/ban-tslint-comment": "error",
@@ -324,12 +405,7 @@ export default [
324
405
  "@typescript-eslint/no-dynamic-delete": "error",
325
406
  "@typescript-eslint/no-empty-function": "error",
326
407
  "@typescript-eslint/no-empty-object-type": "error",
327
- "@typescript-eslint/no-explicit-any": [
328
- "error",
329
- {
330
- "fixToUnknown": true
331
- }
332
- ],
408
+ "@typescript-eslint/no-explicit-any": "error",
333
409
  "@typescript-eslint/no-extra-non-null-assertion": "error",
334
410
  "@typescript-eslint/no-extraneous-class": "error",
335
411
  "@typescript-eslint/no-floating-promises": [
@@ -365,7 +441,12 @@ export default [
365
441
  ],
366
442
  "@typescript-eslint/no-meaningless-void-operator": "error",
367
443
  "@typescript-eslint/no-misused-new": "error",
368
- "@typescript-eslint/no-misused-promises": "error",
444
+ "@typescript-eslint/no-misused-promises": [
445
+ "error",
446
+ {
447
+ "checksVoidReturn": false
448
+ }
449
+ ],
369
450
  "@typescript-eslint/no-misused-spread": "error",
370
451
  "@typescript-eslint/no-mixed-enums": "error",
371
452
  "@typescript-eslint/no-namespace": "error",
@@ -533,17 +614,35 @@ export default [
533
614
  "maxDepth": 3
534
615
  }
535
616
  ],
536
- "import/no-duplicates": [
617
+ "import/no-duplicates": "error",
618
+ "import/no-empty-named-blocks": "error",
619
+ "import/no-extraneous-dependencies": [
537
620
  "error",
538
621
  {
539
- "prefer-inline": true
622
+ "includeTypes": true
540
623
  }
541
624
  ],
542
- "import/no-empty-named-blocks": "error",
543
625
  "import/no-mutable-exports": "error",
544
626
  "import/no-named-as-default": "error",
545
627
  "import/no-named-as-default-member": "error",
628
+ "import/no-named-default": "error",
546
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
+ ],
547
646
  "import/no-useless-path-segments": "error",
548
647
  "jsdoc/check-access": "error",
549
648
  "jsdoc/check-alignment": "error",
@@ -632,7 +731,7 @@ export default [
632
731
  "max-lines-per-function": [
633
732
  "error",
634
733
  {
635
- "max": 50,
734
+ "max": 100,
636
735
  "skipBlankLines": true,
637
736
  "skipComments": true
638
737
  }
@@ -681,6 +780,7 @@ export default [
681
780
  "no-fallthrough": "error",
682
781
  "no-global-assign": "error",
683
782
  "no-implicit-coercion": "error",
783
+ "no-implicit-globals": "error",
684
784
  "no-irregular-whitespace": "error",
685
785
  "no-iterator": "error",
686
786
  "no-labels": "error",
@@ -716,7 +816,12 @@ export default [
716
816
  "no-script-url": "error",
717
817
  "no-self-assign": "error",
718
818
  "no-self-compare": "error",
719
- "no-sequences": "error",
819
+ "no-sequences": [
820
+ "error",
821
+ {
822
+ "allowInParentheses": false
823
+ }
824
+ ],
720
825
  "no-shadow-restricted-names": "error",
721
826
  "no-sparse-arrays": "error",
722
827
  "no-template-curly-in-string": "error",
@@ -731,18 +836,23 @@ export default [
731
836
  "no-useless-assignment": "error",
732
837
  "no-useless-call": "error",
733
838
  "no-useless-catch": "error",
734
- "no-useless-computed-key": "error",
839
+ "no-useless-computed-key": [
840
+ "error",
841
+ {
842
+ "enforceForClassMembers": true
843
+ }
844
+ ],
735
845
  "no-useless-concat": "error",
736
846
  "no-useless-escape": "error",
737
847
  "no-useless-rename": "error",
738
848
  "no-useless-return": "error",
739
849
  "no-var": "error",
740
850
  "no-warning-comments": "warn",
741
- "node/no-unsupported-features/node-builtins": "error",
742
851
  "object-shorthand": [
743
852
  "error",
744
853
  "always",
745
854
  {
855
+ "avoidExplicitReturnArrows": true,
746
856
  "avoidQuotes": true
747
857
  }
748
858
  ],
@@ -777,14 +887,10 @@ export default [
777
887
  "allowNamedFunctions": true
778
888
  }
779
889
  ],
780
- "prefer-const": [
781
- "error",
782
- {
783
- "destructuring": "all"
784
- }
785
- ],
890
+ "prefer-const": "error",
786
891
  "prefer-exponentiation-operator": "error",
787
892
  "prefer-named-capture-group": "error",
893
+ "prefer-numeric-literals": "error",
788
894
  "prefer-object-has-own": "error",
789
895
  "prefer-object-spread": "error",
790
896
  "prefer-regex-literals": "error",
@@ -793,26 +899,12 @@ export default [
793
899
  "prefer-template": "error",
794
900
  "preserve-caught-error": "error",
795
901
  "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",
805
- "react-hooks/rules-of-hooks": "error",
806
902
  "react-refresh/only-export-components": [
807
903
  "warn",
808
904
  {
809
905
  "allowConstantExport": true
810
906
  }
811
907
  ],
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
908
  "react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
817
909
  "react-you-might-not-need-an-effect/no-chain-state-updates": "error",
818
910
  "react-you-might-not-need-an-effect/no-derived-state": "error",
@@ -822,23 +914,87 @@ export default [
822
914
  "react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
823
915
  "react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
824
916
  "react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
917
+ "react/button-has-type": "error",
918
+ "react/component-hook-factories": "error",
919
+ "react/context-name": "warn",
920
+ "react/destructuring-assignment": "warn",
921
+ "react/error-boundaries": "error",
922
+ "react/exhaustive-deps": "warn",
923
+ "react/forward-ref-uses-ref": "error",
924
+ "react/function-definition": "error",
925
+ "react/hook-use-state": "warn",
926
+ "react/id-name": "warn",
927
+ "react/iframe-missing-sandbox": "error",
928
+ "react/jsx-key": "error",
929
+ "react/jsx-key-before-spread": "error",
930
+ "react/jsx-no-children-prop-with-children": "error",
825
931
  "react/jsx-no-comment-textnodes": "error",
826
- "react/jsx-shorthand-boolean": "error",
932
+ "react/jsx-no-constructed-context-values": "error",
933
+ "react/jsx-no-leaked-render": "error",
934
+ "react/jsx-no-leaked-semicolon": "warn",
935
+ "react/jsx-no-script-url": "warn",
936
+ "react/jsx-no-target-blank": "error",
937
+ "react/jsx-no-useless-fragment": "error",
827
938
  "react/no-access-state-in-setstate": "error",
828
939
  "react/no-array-index-key": "error",
940
+ "react/no-children-count": "warn",
941
+ "react/no-children-for-each": "warn",
942
+ "react/no-children-map": "warn",
943
+ "react/no-children-only": "warn",
829
944
  "react/no-children-prop": "error",
945
+ "react/no-children-to-array": "warn",
946
+ "react/no-class-component": "error",
947
+ "react/no-clone-element": "warn",
948
+ "react/no-component-will-mount": "error",
949
+ "react/no-component-will-receive-props": "error",
950
+ "react/no-component-will-update": "error",
830
951
  "react/no-context-provider": "error",
952
+ "react/no-create-ref": "error",
953
+ "react/no-danger": "warn",
954
+ "react/no-danger-with-children": "error",
955
+ "react/no-did-mount-set-state": "warn",
956
+ "react/no-did-update-set-state": "warn",
831
957
  "react/no-direct-mutation-state": "error",
832
958
  "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",
959
+ "react/no-find-dom-node": "error",
960
+ "react/no-flush-sync": "error",
961
+ "react/no-hydrate": "error",
962
+ "react/no-implicit-key": "error",
963
+ "react/no-leaked-event-listener": "error",
964
+ "react/no-leaked-interval": "error",
965
+ "react/no-leaked-resize-observer": "error",
966
+ "react/no-leaked-timeout": "error",
967
+ "react/no-misused-capture-owner-stack": "error",
968
+ "react/no-namespace": "error",
969
+ "react/no-nested-lazy-component-declarations": "error",
970
+ "react/no-object-type-as-default-prop": "error",
971
+ "react/no-redundant-should-component-update": "error",
972
+ "react/no-render": "error",
973
+ "react/no-render-return-value": "error",
974
+ "react/no-unknown-property": "error",
975
+ "react/no-unnecessary-use-callback": "warn",
976
+ "react/no-unnecessary-use-memo": "warn",
977
+ "react/no-unnecessary-use-prefix": "warn",
978
+ "react/no-unsafe-component-will-mount": "warn",
979
+ "react/no-unsafe-component-will-receive-props": "warn",
980
+ "react/no-unsafe-component-will-update": "warn",
981
+ "react/no-unsafe-iframe-sandbox": "warn",
982
+ "react/no-unstable-nested-components": "error",
983
+ "react/no-unused-class-component-members": "warn",
984
+ "react/no-unused-props": "warn",
839
985
  "react/no-unused-state": "error",
840
986
  "react/no-use-context": "error",
841
- "react/no-useless-fragment": "error",
987
+ "react/no-use-form-state": "error",
988
+ "react/no-will-update-set-state": "warn",
989
+ "react/purity": "warn",
990
+ "react/ref-name": "warn",
991
+ "react/rules-of-hooks": "error",
992
+ "react/set-state-in-effect": "warn",
993
+ "react/set-state-in-render": "error",
994
+ "react/style-prop-object": "error",
995
+ "react/unsupported-syntax": "error",
996
+ "react/use-memo": "error",
997
+ "react/void-dom-elements-no-children": "error",
842
998
  "regexp/confusing-quantifier": "warn",
843
999
  "regexp/control-character-escape": "error",
844
1000
  "regexp/match-any": "error",
@@ -985,7 +1141,8 @@ export default [
985
1141
  {
986
1142
  "cases": {
987
1143
  "camelCase": true,
988
- "pascalCase": true
1144
+ "pascalCase": true,
1145
+ "kebabCase": true
989
1146
  }
990
1147
  }
991
1148
  ],
@@ -1019,7 +1176,12 @@ export default [
1019
1176
  "unicorn/no-useless-promise-resolve-reject": "error",
1020
1177
  "unicorn/no-useless-spread": "error",
1021
1178
  "unicorn/no-useless-switch-case": "error",
1022
- "unicorn/no-useless-undefined": "error",
1179
+ "unicorn/no-useless-undefined": [
1180
+ "warn",
1181
+ {
1182
+ "checkArguments": false
1183
+ }
1184
+ ],
1023
1185
  "unicorn/no-zero-fractions": "error",
1024
1186
  "unicorn/numeric-separators-style": "error",
1025
1187
  "unicorn/prefer-array-find": "error",
@@ -1030,6 +1192,7 @@ export default [
1030
1192
  "unicorn/prefer-at": "error",
1031
1193
  "unicorn/prefer-date-now": "error",
1032
1194
  "unicorn/prefer-default-parameters": "error",
1195
+ "unicorn/prefer-dom-node-dataset": "error",
1033
1196
  "unicorn/prefer-export-from": [
1034
1197
  "error",
1035
1198
  {
@@ -1076,8 +1239,19 @@ export default [
1076
1239
  "unicorn/text-encoding-identifier-case": "error",
1077
1240
  "unicorn/throw-new-error": "error",
1078
1241
  "unused-imports/no-unused-imports": "error",
1079
- "use-isnan": "error",
1080
- "valid-typeof": "error",
1242
+ "use-isnan": [
1243
+ "error",
1244
+ {
1245
+ "enforceForIndexOf": true,
1246
+ "enforceForSwitchCase": true
1247
+ }
1248
+ ],
1249
+ "valid-typeof": [
1250
+ "error",
1251
+ {
1252
+ "requireStringLiterals": true
1253
+ }
1254
+ ],
1081
1255
  "yoda": "error"
1082
1256
  },
1083
1257
  },
@@ -1087,78 +1261,156 @@ export default [
1087
1261
  name: "eslint-config-setup/js-compat",
1088
1262
  files: ["**/*.{js,mjs,cjs}"],
1089
1263
  rules: {
1264
+ "@typescript-eslint/adjacent-overload-signatures": "off",
1265
+ "@typescript-eslint/array-type": "off",
1090
1266
  "@typescript-eslint/await-thenable": "off",
1267
+ "@typescript-eslint/ban-ts-comment": "off",
1268
+ "@typescript-eslint/ban-tslint-comment": "off",
1269
+ "@typescript-eslint/class-literal-property-style": "off",
1270
+ "@typescript-eslint/consistent-generic-constructors": "off",
1271
+ "@typescript-eslint/consistent-indexed-object-style": "off",
1091
1272
  "@typescript-eslint/consistent-return": "off",
1273
+ "@typescript-eslint/consistent-type-assertions": "off",
1274
+ "@typescript-eslint/consistent-type-definitions": "off",
1275
+ "@typescript-eslint/consistent-type-exports": "off",
1276
+ "@typescript-eslint/consistent-type-imports": "off",
1092
1277
  "@typescript-eslint/dot-notation": "off",
1278
+ "@typescript-eslint/explicit-function-return-type": "off",
1279
+ "@typescript-eslint/explicit-member-accessibility": "off",
1280
+ "@typescript-eslint/member-ordering": "off",
1281
+ "@typescript-eslint/method-signature-style": "off",
1282
+ "@typescript-eslint/naming-convention": "off",
1283
+ "@typescript-eslint/no-array-constructor": "off",
1093
1284
  "@typescript-eslint/no-array-delete": "off",
1094
1285
  "@typescript-eslint/no-base-to-string": "off",
1286
+ "@typescript-eslint/no-confusing-non-null-assertion": "off",
1095
1287
  "@typescript-eslint/no-confusing-void-expression": "off",
1096
1288
  "@typescript-eslint/no-deprecated": "off",
1289
+ "@typescript-eslint/no-duplicate-enum-values": "off",
1097
1290
  "@typescript-eslint/no-duplicate-type-constituents": "off",
1291
+ "@typescript-eslint/no-dynamic-delete": "off",
1292
+ "@typescript-eslint/no-empty-function": "off",
1293
+ "@typescript-eslint/no-empty-object-type": "off",
1294
+ "@typescript-eslint/no-explicit-any": "off",
1295
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
1296
+ "@typescript-eslint/no-extraneous-class": "off",
1297
+ "@typescript-eslint/no-floating-promises": "off",
1098
1298
  "@typescript-eslint/no-for-in-array": "off",
1099
1299
  "@typescript-eslint/no-implied-eval": "off",
1300
+ "@typescript-eslint/no-import-type-side-effects": "off",
1301
+ "@typescript-eslint/no-inferrable-types": "off",
1302
+ "@typescript-eslint/no-invalid-void-type": "off",
1303
+ "@typescript-eslint/no-magic-numbers": "off",
1100
1304
  "@typescript-eslint/no-meaningless-void-operator": "off",
1305
+ "@typescript-eslint/no-misused-new": "off",
1101
1306
  "@typescript-eslint/no-misused-promises": "off",
1102
1307
  "@typescript-eslint/no-misused-spread": "off",
1103
1308
  "@typescript-eslint/no-mixed-enums": "off",
1309
+ "@typescript-eslint/no-namespace": "off",
1310
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
1311
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
1312
+ "@typescript-eslint/no-non-null-assertion": "off",
1104
1313
  "@typescript-eslint/no-redundant-type-constituents": "off",
1314
+ "@typescript-eslint/no-require-imports": "off",
1315
+ "@typescript-eslint/no-shadow": "off",
1316
+ "@typescript-eslint/no-this-alias": "off",
1105
1317
  "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1106
1318
  "@typescript-eslint/no-unnecessary-condition": "off",
1319
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
1107
1320
  "@typescript-eslint/no-unnecessary-qualifier": "off",
1108
1321
  "@typescript-eslint/no-unnecessary-template-expression": "off",
1109
1322
  "@typescript-eslint/no-unnecessary-type-arguments": "off",
1110
1323
  "@typescript-eslint/no-unnecessary-type-assertion": "off",
1324
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
1111
1325
  "@typescript-eslint/no-unnecessary-type-conversion": "off",
1112
1326
  "@typescript-eslint/no-unnecessary-type-parameters": "off",
1113
1327
  "@typescript-eslint/no-unsafe-argument": "off",
1114
1328
  "@typescript-eslint/no-unsafe-assignment": "off",
1115
1329
  "@typescript-eslint/no-unsafe-call": "off",
1330
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
1116
1331
  "@typescript-eslint/no-unsafe-enum-comparison": "off",
1332
+ "@typescript-eslint/no-unsafe-function-type": "off",
1117
1333
  "@typescript-eslint/no-unsafe-member-access": "off",
1118
1334
  "@typescript-eslint/no-unsafe-return": "off",
1335
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
1119
1336
  "@typescript-eslint/no-unsafe-unary-minus": "off",
1337
+ "@typescript-eslint/no-unused-expressions": "off",
1338
+ "@typescript-eslint/no-unused-vars": "off",
1339
+ "@typescript-eslint/no-useless-constructor": "off",
1120
1340
  "@typescript-eslint/no-useless-default-assignment": "off",
1341
+ "@typescript-eslint/no-useless-empty-export": "off",
1342
+ "@typescript-eslint/no-wrapper-object-types": "off",
1121
1343
  "@typescript-eslint/non-nullable-type-assertion-style": "off",
1122
1344
  "@typescript-eslint/only-throw-error": "off",
1345
+ "@typescript-eslint/prefer-as-const": "off",
1123
1346
  "@typescript-eslint/prefer-destructuring": "off",
1347
+ "@typescript-eslint/prefer-enum-initializers": "off",
1124
1348
  "@typescript-eslint/prefer-find": "off",
1349
+ "@typescript-eslint/prefer-for-of": "off",
1350
+ "@typescript-eslint/prefer-function-type": "off",
1125
1351
  "@typescript-eslint/prefer-includes": "off",
1352
+ "@typescript-eslint/prefer-literal-enum-member": "off",
1353
+ "@typescript-eslint/prefer-namespace-keyword": "off",
1126
1354
  "@typescript-eslint/prefer-nullish-coalescing": "off",
1127
1355
  "@typescript-eslint/prefer-optional-chain": "off",
1128
1356
  "@typescript-eslint/prefer-promise-reject-errors": "off",
1357
+ "@typescript-eslint/prefer-readonly": "off",
1129
1358
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
1130
1359
  "@typescript-eslint/prefer-reduce-type-parameter": "off",
1131
1360
  "@typescript-eslint/prefer-regexp-exec": "off",
1132
1361
  "@typescript-eslint/prefer-return-this-type": "off",
1133
1362
  "@typescript-eslint/prefer-string-starts-ends-with": "off",
1363
+ "@typescript-eslint/promise-function-async": "off",
1134
1364
  "@typescript-eslint/related-getter-setter-pairs": "off",
1365
+ "@typescript-eslint/require-array-sort-compare": "off",
1135
1366
  "@typescript-eslint/require-await": "off",
1136
1367
  "@typescript-eslint/restrict-plus-operands": "off",
1137
1368
  "@typescript-eslint/restrict-template-expressions": "off",
1138
1369
  "@typescript-eslint/return-await": "off",
1139
1370
  "@typescript-eslint/strict-boolean-expressions": "off",
1140
1371
  "@typescript-eslint/strict-void-return": "off",
1372
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1373
+ "@typescript-eslint/triple-slash-reference": "off",
1141
1374
  "@typescript-eslint/unbound-method": "off",
1375
+ "@typescript-eslint/unified-signatures": "off",
1142
1376
  "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
1143
1377
  "constructor-super": "error",
1378
+ "dot-notation": "off",
1144
1379
  "getter-return": "error",
1380
+ "no-array-constructor": "off",
1145
1381
  "no-class-assign": "error",
1146
1382
  "no-const-assign": "error",
1147
1383
  "no-dupe-args": "error",
1148
1384
  "no-dupe-class-members": "error",
1149
1385
  "no-dupe-keys": "error",
1386
+ "no-empty-function": "off",
1150
1387
  "no-func-assign": "error",
1388
+ "no-implied-eval": "off",
1151
1389
  "no-import-assign": "error",
1152
1390
  "no-new-native-nonconstructor": "error",
1153
1391
  "no-new-symbol": "off",
1154
1392
  "no-obj-calls": "error",
1155
1393
  "no-redeclare": "error",
1394
+ "no-return-await": "off",
1156
1395
  "no-setter-return": "error",
1396
+ "no-shadow": "off",
1157
1397
  "no-this-before-super": "error",
1398
+ "no-throw-literal": "off",
1158
1399
  "no-undef": "error",
1159
1400
  "no-unreachable": "error",
1160
1401
  "no-unsafe-negation": "error",
1161
- "no-with": "error"
1402
+ "no-unused-expressions": "off",
1403
+ "no-unused-vars": "error",
1404
+ "no-useless-constructor": "off",
1405
+ "no-with": "error",
1406
+ "prefer-const": [
1407
+ "error",
1408
+ {
1409
+ "destructuring": "all"
1410
+ }
1411
+ ],
1412
+ "prefer-promise-reject-errors": "off",
1413
+ "require-await": "off"
1162
1414
  },
1163
1415
  },
1164
1416
 
@@ -1417,7 +1669,137 @@ export default [
1417
1669
  // Markdown/MDX code block linting
1418
1670
  {
1419
1671
  ...mdxPlugin.flatCodeBlocks,
1672
+ languageOptions: {
1673
+ ...mdxPlugin.flatCodeBlocks.languageOptions,
1674
+ parserOptions: {
1675
+ ...mdxPlugin.flatCodeBlocks.languageOptions?.parserOptions,
1676
+ projectService: false,
1677
+ },
1678
+ },
1420
1679
  rules: {
1680
+ ...{
1681
+ "@typescript-eslint/adjacent-overload-signatures": "off",
1682
+ "@typescript-eslint/array-type": "off",
1683
+ "@typescript-eslint/await-thenable": "off",
1684
+ "@typescript-eslint/ban-ts-comment": "off",
1685
+ "@typescript-eslint/ban-tslint-comment": "off",
1686
+ "@typescript-eslint/class-literal-property-style": "off",
1687
+ "@typescript-eslint/consistent-generic-constructors": "off",
1688
+ "@typescript-eslint/consistent-indexed-object-style": "off",
1689
+ "@typescript-eslint/consistent-type-assertions": "off",
1690
+ "@typescript-eslint/consistent-type-definitions": "off",
1691
+ "@typescript-eslint/consistent-type-exports": "off",
1692
+ "@typescript-eslint/consistent-type-imports": "off",
1693
+ "@typescript-eslint/dot-notation": "off",
1694
+ "@typescript-eslint/explicit-function-return-type": "off",
1695
+ "@typescript-eslint/explicit-member-accessibility": "off",
1696
+ "@typescript-eslint/member-ordering": "off",
1697
+ "@typescript-eslint/method-signature-style": "off",
1698
+ "@typescript-eslint/naming-convention": "off",
1699
+ "@typescript-eslint/no-array-constructor": "off",
1700
+ "@typescript-eslint/no-array-delete": "off",
1701
+ "@typescript-eslint/no-base-to-string": "off",
1702
+ "@typescript-eslint/no-confusing-non-null-assertion": "off",
1703
+ "@typescript-eslint/no-confusing-void-expression": "off",
1704
+ "@typescript-eslint/no-deprecated": "off",
1705
+ "@typescript-eslint/no-duplicate-enum-values": "off",
1706
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
1707
+ "@typescript-eslint/no-dynamic-delete": "off",
1708
+ "@typescript-eslint/no-empty-function": "off",
1709
+ "@typescript-eslint/no-empty-object-type": "off",
1710
+ "@typescript-eslint/no-explicit-any": "off",
1711
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
1712
+ "@typescript-eslint/no-extraneous-class": "off",
1713
+ "@typescript-eslint/no-floating-promises": "off",
1714
+ "@typescript-eslint/no-for-in-array": "off",
1715
+ "@typescript-eslint/no-implied-eval": "off",
1716
+ "@typescript-eslint/no-import-type-side-effects": "off",
1717
+ "@typescript-eslint/no-inferrable-types": "off",
1718
+ "@typescript-eslint/no-invalid-void-type": "off",
1719
+ "@typescript-eslint/no-magic-numbers": "off",
1720
+ "@typescript-eslint/no-meaningless-void-operator": "off",
1721
+ "@typescript-eslint/no-misused-new": "off",
1722
+ "@typescript-eslint/no-misused-spread": "off",
1723
+ "@typescript-eslint/no-mixed-enums": "off",
1724
+ "@typescript-eslint/no-namespace": "off",
1725
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
1726
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
1727
+ "@typescript-eslint/no-non-null-assertion": "off",
1728
+ "@typescript-eslint/no-redundant-type-constituents": "off",
1729
+ "@typescript-eslint/no-require-imports": "off",
1730
+ "@typescript-eslint/no-shadow": "off",
1731
+ "@typescript-eslint/no-this-alias": "off",
1732
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1733
+ "@typescript-eslint/no-unnecessary-condition": "off",
1734
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
1735
+ "@typescript-eslint/no-unnecessary-qualifier": "off",
1736
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
1737
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
1738
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
1739
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
1740
+ "@typescript-eslint/no-unnecessary-type-conversion": "off",
1741
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
1742
+ "@typescript-eslint/no-unsafe-argument": "off",
1743
+ "@typescript-eslint/no-unsafe-assignment": "off",
1744
+ "@typescript-eslint/no-unsafe-call": "off",
1745
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
1746
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
1747
+ "@typescript-eslint/no-unsafe-function-type": "off",
1748
+ "@typescript-eslint/no-unsafe-member-access": "off",
1749
+ "@typescript-eslint/no-unsafe-return": "off",
1750
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
1751
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
1752
+ "@typescript-eslint/no-unused-expressions": "off",
1753
+ "@typescript-eslint/no-unused-vars": "off",
1754
+ "@typescript-eslint/no-useless-constructor": "off",
1755
+ "@typescript-eslint/no-useless-default-assignment": "off",
1756
+ "@typescript-eslint/no-useless-empty-export": "off",
1757
+ "@typescript-eslint/no-wrapper-object-types": "off",
1758
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
1759
+ "@typescript-eslint/only-throw-error": "off",
1760
+ "@typescript-eslint/prefer-as-const": "off",
1761
+ "@typescript-eslint/prefer-enum-initializers": "off",
1762
+ "@typescript-eslint/prefer-find": "off",
1763
+ "@typescript-eslint/prefer-for-of": "off",
1764
+ "@typescript-eslint/prefer-function-type": "off",
1765
+ "@typescript-eslint/prefer-includes": "off",
1766
+ "@typescript-eslint/prefer-literal-enum-member": "off",
1767
+ "@typescript-eslint/prefer-namespace-keyword": "off",
1768
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
1769
+ "@typescript-eslint/prefer-optional-chain": "off",
1770
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
1771
+ "@typescript-eslint/prefer-readonly": "off",
1772
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
1773
+ "@typescript-eslint/prefer-regexp-exec": "off",
1774
+ "@typescript-eslint/prefer-return-this-type": "off",
1775
+ "@typescript-eslint/prefer-string-starts-ends-with": "off",
1776
+ "@typescript-eslint/promise-function-async": "off",
1777
+ "@typescript-eslint/related-getter-setter-pairs": "off",
1778
+ "@typescript-eslint/require-array-sort-compare": "off",
1779
+ "@typescript-eslint/require-await": "off",
1780
+ "@typescript-eslint/restrict-plus-operands": "off",
1781
+ "@typescript-eslint/restrict-template-expressions": "off",
1782
+ "@typescript-eslint/return-await": "off",
1783
+ "@typescript-eslint/strict-boolean-expressions": "off",
1784
+ "@typescript-eslint/strict-void-return": "off",
1785
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1786
+ "@typescript-eslint/triple-slash-reference": "off",
1787
+ "@typescript-eslint/unbound-method": "off",
1788
+ "@typescript-eslint/unified-signatures": "off",
1789
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
1790
+ "dot-notation": "off",
1791
+ "no-array-constructor": "off",
1792
+ "no-empty-function": "off",
1793
+ "no-implied-eval": "off",
1794
+ "no-return-await": "off",
1795
+ "no-shadow": "off",
1796
+ "no-throw-literal": "off",
1797
+ "no-useless-constructor": "off",
1798
+ "prefer-promise-reject-errors": "off",
1799
+ "require-await": "off",
1800
+ "strict": "off",
1801
+ "unicode-bom": "off"
1802
+ },
1421
1803
  ...mdxPlugin.flatCodeBlocks.rules,
1422
1804
  "eol-last": "off",
1423
1805
  "no-undef": "off",