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.
- package/README.md +27 -5
- package/dist/configs/0b23ff88.js +137 -42
- package/dist/configs/12c62446.js +154 -25
- package/dist/configs/196d687e.js +287 -70
- package/dist/configs/1c3f743c.js +157 -26
- package/dist/configs/2f6f3a82.js +308 -57
- package/dist/configs/4eb62e57.js +140 -40
- package/dist/configs/52762a42.js +280 -36
- package/dist/configs/532f50a4.js +485 -48
- package/dist/configs/5a302873.js +305 -56
- package/dist/configs/6bc0d588.js +456 -57
- package/dist/configs/91e82988.js +487 -48
- package/dist/configs/c2fecd3d.js +282 -33
- package/dist/configs/cde010b4.js +313 -17
- package/dist/configs/d537b683.js +458 -54
- package/dist/configs/db69ebb6.js +290 -68
- package/dist/configs/e4b137fa.js +311 -17
- package/dist/index.d.ts +13 -13
- package/dist/index.js +65 -67
- package/dist/index.js.map +1 -1
- package/dist/modules.d.ts +42 -41
- package/dist/modules.js +1183 -1106
- package/dist/modules.js.map +1 -1
- package/dist/oxlint-configs/3047b7d6.json +268 -145
- package/dist/oxlint-configs/58d5e03b.json +266 -144
- package/dist/oxlint-configs/78b40daa.json +301 -155
- package/dist/oxlint-configs/7ff0d87e.json +361 -237
- package/dist/oxlint-configs/85912bf0.json +362 -237
- package/dist/oxlint-configs/9dc42dc3.json +300 -155
- package/dist/oxlint-configs/d46cb9b7.json +397 -241
- package/dist/oxlint-configs/ef643c60.json +398 -241
- package/dist/{types-CAUUIuJR.d.ts → types-CAO1PbsB.d.ts} +7 -7
- package/package.json +42 -39
package/dist/configs/196d687e.js
CHANGED
|
@@ -9,8 +9,6 @@ import globals from "globals"
|
|
|
9
9
|
import importXPlugin from "eslint-plugin-import-x"
|
|
10
10
|
import jsdocPlugin from "eslint-plugin-jsdoc"
|
|
11
11
|
import jsonPlugin from "@eslint/json"
|
|
12
|
-
import jsxA11yPlugin from "eslint-plugin-jsx-a11y"
|
|
13
|
-
import nodePlugin from "eslint-plugin-n"
|
|
14
12
|
import oxlintPlugin from "eslint-plugin-oxlint"
|
|
15
13
|
import packageJsonPlugin from "eslint-plugin-package-json"
|
|
16
14
|
import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
@@ -28,13 +26,99 @@ 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 — maps @eslint-react rule families into the `react/` namespace
|
|
30
|
+
// and aliases rules to legacy eslint-plugin-react names for OxLint compatibility.
|
|
31
|
+
const reactCompatPlugin = (() => {
|
|
32
|
+
const core = eslintReactPlugin.rules
|
|
33
|
+
const select = (prefix) => Object.fromEntries(
|
|
34
|
+
Object.entries(core)
|
|
35
|
+
.filter(([name]) => name.startsWith(prefix))
|
|
36
|
+
.map(([name, rule]) => [name.slice(prefix.length), rule]),
|
|
37
|
+
)
|
|
38
|
+
const dom = select("dom-")
|
|
39
|
+
const jsx = select("jsx-")
|
|
40
|
+
const naming = select("naming-convention-")
|
|
41
|
+
const rsc = select("rsc-")
|
|
42
|
+
const webApi = select("web-api-")
|
|
43
|
+
|
|
44
|
+
// Legacy aliases: legacy name → [source, original name]
|
|
45
|
+
const aliases = {
|
|
46
|
+
"jsx-key": [core, "no-missing-key"],
|
|
47
|
+
"jsx-key-before-spread": [jsx, "no-key-after-spread"],
|
|
48
|
+
"jsx-no-constructed-context-values": [core, "no-unstable-context-value"],
|
|
49
|
+
"jsx-no-leaked-render": [core, "no-leaked-conditional-rendering"],
|
|
50
|
+
"jsx-no-useless-fragment": [jsx, "no-useless-fragment"],
|
|
51
|
+
"no-object-type-as-default-prop": [core, "no-unstable-default-props"],
|
|
52
|
+
"no-unstable-nested-components": [core, "no-nested-component-definitions"],
|
|
53
|
+
"display-name": [core, "no-missing-component-display-name"],
|
|
54
|
+
"forward-ref-uses-ref": [core, "no-forward-ref"],
|
|
55
|
+
"no-did-mount-set-state": [core, "no-set-state-in-component-did-mount"],
|
|
56
|
+
"no-did-update-set-state": [core, "no-set-state-in-component-did-update"],
|
|
57
|
+
"no-will-update-set-state": [core, "no-set-state-in-component-will-update"],
|
|
58
|
+
"hook-use-state": [core, "use-state"],
|
|
59
|
+
"no-danger": [dom, "no-dangerously-set-innerhtml"],
|
|
60
|
+
"no-danger-with-children": [dom, "no-dangerously-set-innerhtml-with-children"],
|
|
61
|
+
"no-find-dom-node": [dom, "no-find-dom-node"],
|
|
62
|
+
"no-namespace": [jsx, "no-namespace"],
|
|
63
|
+
"no-render-return-value": [dom, "no-render-return-value"],
|
|
64
|
+
"jsx-no-script-url": [dom, "no-script-url"],
|
|
65
|
+
"jsx-no-target-blank": [dom, "no-unsafe-target-blank"],
|
|
66
|
+
"no-unknown-property": [dom, "no-unknown-property"],
|
|
67
|
+
"void-dom-elements-no-children": [dom, "no-void-elements-with-children"],
|
|
68
|
+
"button-has-type": [dom, "no-missing-button-type"],
|
|
69
|
+
"iframe-missing-sandbox": [dom, "no-missing-iframe-sandbox"],
|
|
70
|
+
"style-prop-object": [dom, "no-string-style-prop"],
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Identical-name aliases (core rules where legacy name = @eslint-react name)
|
|
74
|
+
const identicalCore = [
|
|
75
|
+
"no-access-state-in-setstate", "no-array-index-key",
|
|
76
|
+
"no-direct-mutation-state",
|
|
77
|
+
"no-unused-class-component-members", "no-unused-state",
|
|
78
|
+
]
|
|
79
|
+
for (const n of identicalCore) aliases[n] = [core, n]
|
|
80
|
+
aliases["no-children-prop"] = [jsx, "no-children-prop"]
|
|
81
|
+
aliases["jsx-no-comment-textnodes"] = [jsx, "no-comment-textnodes"]
|
|
82
|
+
|
|
83
|
+
// Build aliased originals set
|
|
84
|
+
const aliasedCore = new Set()
|
|
85
|
+
for (const [src, name] of Object.values(aliases)) {
|
|
86
|
+
if (src === core) aliasedCore.add(name)
|
|
87
|
+
else if (src === dom) aliasedCore.add("dom-" + name)
|
|
88
|
+
else if (src === jsx) aliasedCore.add("jsx-" + name)
|
|
89
|
+
else if (src === naming) aliasedCore.add("naming-convention-" + name)
|
|
90
|
+
else if (src === rsc) aliasedCore.add("rsc-" + name)
|
|
91
|
+
else if (src === webApi) aliasedCore.add("web-api-" + name)
|
|
92
|
+
}
|
|
93
|
+
const rules = {}
|
|
94
|
+
|
|
95
|
+
// Core rules (skip aliased originals)
|
|
96
|
+
for (const [n, r] of Object.entries(core)) { if (!aliasedCore.has(n)) rules[n] = r }
|
|
97
|
+
|
|
98
|
+
// Sub-plugin rules (skip aliased + prefer-namespace-import collision)
|
|
99
|
+
const subs = [[dom, new Set(['prefer-namespace-import'])], [jsx], [webApi], [naming], [rsc]]
|
|
100
|
+
for (const [src, skip] of subs) {
|
|
101
|
+
for (const [n, r] of Object.entries(src)) {
|
|
102
|
+
if (skip && skip.has(n)) continue
|
|
103
|
+
if (Object.values(aliases).some(([s, o]) => s === src && o === n)) continue
|
|
104
|
+
rules[n] = r
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Add legacy aliases
|
|
109
|
+
for (const [legacy, [src, orig]] of Object.entries(aliases)) rules[legacy] = src[orig]
|
|
110
|
+
|
|
111
|
+
return { meta: { name: "react-compat", version: "1.0.0" }, rules }
|
|
112
|
+
})()
|
|
113
|
+
|
|
31
114
|
export default [
|
|
32
115
|
// TypeScript parser setup
|
|
33
116
|
...tseslint.configs.strictTypeChecked.slice(0, 2),
|
|
34
117
|
|
|
35
|
-
// Base rules — all effective rules for
|
|
118
|
+
// Base rules — all effective rules for TS plus shared JS/TS rules
|
|
36
119
|
{
|
|
37
120
|
name: "eslint-config-setup/base",
|
|
121
|
+
ignores: ["**/*.{md,mdx}"],
|
|
38
122
|
plugins: {
|
|
39
123
|
"@cspell": cspellPlugin,
|
|
40
124
|
"@stylistic": stylisticPlugin,
|
|
@@ -43,13 +127,9 @@ export default [
|
|
|
43
127
|
"de-morgan": deMorganPlugin,
|
|
44
128
|
"import": importXPlugin,
|
|
45
129
|
"jsdoc": jsdocPlugin,
|
|
46
|
-
"jsx-a11y": jsxA11yPlugin,
|
|
47
|
-
"node": nodePlugin,
|
|
48
130
|
"perfectionist": perfectionistPlugin,
|
|
49
|
-
"react":
|
|
50
|
-
"react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
|
|
131
|
+
"react": reactCompatPlugin,
|
|
51
132
|
"react-hooks": reactHooksPlugin,
|
|
52
|
-
"react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
|
|
53
133
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
54
134
|
"regexp": regexpPlugin,
|
|
55
135
|
"security": securityPlugin,
|
|
@@ -93,7 +173,6 @@ export default [
|
|
|
93
173
|
}
|
|
94
174
|
],
|
|
95
175
|
"@typescript-eslint/dot-notation": "error",
|
|
96
|
-
"@typescript-eslint/explicit-member-accessibility": "error",
|
|
97
176
|
"@typescript-eslint/member-ordering": [
|
|
98
177
|
"warn",
|
|
99
178
|
{
|
|
@@ -153,10 +232,6 @@ export default [
|
|
|
153
232
|
]
|
|
154
233
|
}
|
|
155
234
|
],
|
|
156
|
-
"@typescript-eslint/method-signature-style": [
|
|
157
|
-
"error",
|
|
158
|
-
"property"
|
|
159
|
-
],
|
|
160
235
|
"@typescript-eslint/naming-convention": [
|
|
161
236
|
"error",
|
|
162
237
|
{
|
|
@@ -290,7 +365,12 @@ export default [
|
|
|
290
365
|
"@typescript-eslint/no-for-in-array": "error",
|
|
291
366
|
"@typescript-eslint/no-implied-eval": "error",
|
|
292
367
|
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
293
|
-
"@typescript-eslint/no-misused-promises":
|
|
368
|
+
"@typescript-eslint/no-misused-promises": [
|
|
369
|
+
"error",
|
|
370
|
+
{
|
|
371
|
+
"checksVoidReturn": false
|
|
372
|
+
}
|
|
373
|
+
],
|
|
294
374
|
"@typescript-eslint/no-misused-spread": "error",
|
|
295
375
|
"@typescript-eslint/no-mixed-enums": "error",
|
|
296
376
|
"@typescript-eslint/no-redundant-type-constituents": "error",
|
|
@@ -399,7 +479,12 @@ export default [
|
|
|
399
479
|
"getBeforeSet"
|
|
400
480
|
],
|
|
401
481
|
"guard-for-in": "error",
|
|
402
|
-
"import/
|
|
482
|
+
"import/no-extraneous-dependencies": [
|
|
483
|
+
"error",
|
|
484
|
+
{
|
|
485
|
+
"includeTypes": true
|
|
486
|
+
}
|
|
487
|
+
],
|
|
403
488
|
"import/no-useless-path-segments": "error",
|
|
404
489
|
"jsdoc/check-alignment": "error",
|
|
405
490
|
"jsdoc/check-param-names": "error",
|
|
@@ -415,13 +500,9 @@ export default [
|
|
|
415
500
|
"jsdoc/reject-function-type": "error",
|
|
416
501
|
"jsdoc/require-next-type": "error",
|
|
417
502
|
"jsdoc/require-returns-check": "error",
|
|
418
|
-
"jsdoc/require-throws-type": "error",
|
|
419
503
|
"jsdoc/require-yields-check": "error",
|
|
420
|
-
"jsdoc/require-yields-type": "error",
|
|
421
504
|
"jsdoc/ts-no-empty-object-type": "error",
|
|
422
505
|
"jsdoc/valid-types": "error",
|
|
423
|
-
"jsx-a11y/interactive-supports-focus": "error",
|
|
424
|
-
"jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
425
506
|
"logical-assignment-operators": [
|
|
426
507
|
"error",
|
|
427
508
|
"always",
|
|
@@ -444,7 +525,7 @@ export default [
|
|
|
444
525
|
"max-lines-per-function": [
|
|
445
526
|
"error",
|
|
446
527
|
{
|
|
447
|
-
"max":
|
|
528
|
+
"max": 100,
|
|
448
529
|
"skipBlankLines": true,
|
|
449
530
|
"skipComments": true
|
|
450
531
|
}
|
|
@@ -476,6 +557,7 @@ export default [
|
|
|
476
557
|
"no-extra-bind": "error",
|
|
477
558
|
"no-fallthrough": "error",
|
|
478
559
|
"no-implicit-coercion": "error",
|
|
560
|
+
"no-implicit-globals": "error",
|
|
479
561
|
"no-labels": "error",
|
|
480
562
|
"no-lone-blocks": "error",
|
|
481
563
|
"no-lonely-if": "error",
|
|
@@ -505,23 +587,33 @@ export default [
|
|
|
505
587
|
],
|
|
506
588
|
"no-script-url": "error",
|
|
507
589
|
"no-self-compare": "error",
|
|
508
|
-
"no-sequences":
|
|
590
|
+
"no-sequences": [
|
|
591
|
+
"error",
|
|
592
|
+
{
|
|
593
|
+
"allowInParentheses": false
|
|
594
|
+
}
|
|
595
|
+
],
|
|
509
596
|
"no-template-curly-in-string": "error",
|
|
510
597
|
"no-unmodified-loop-condition": "error",
|
|
511
598
|
"no-unneeded-ternary": "error",
|
|
512
599
|
"no-unreachable-loop": "error",
|
|
513
600
|
"no-useless-assignment": "error",
|
|
514
601
|
"no-useless-call": "error",
|
|
515
|
-
"no-useless-computed-key":
|
|
602
|
+
"no-useless-computed-key": [
|
|
603
|
+
"error",
|
|
604
|
+
{
|
|
605
|
+
"enforceForClassMembers": true
|
|
606
|
+
}
|
|
607
|
+
],
|
|
516
608
|
"no-useless-concat": "error",
|
|
517
609
|
"no-useless-return": "error",
|
|
518
610
|
"no-var": "error",
|
|
519
611
|
"no-warning-comments": "warn",
|
|
520
|
-
"node/no-unsupported-features/node-builtins": "error",
|
|
521
612
|
"object-shorthand": [
|
|
522
613
|
"error",
|
|
523
614
|
"always",
|
|
524
615
|
{
|
|
616
|
+
"avoidExplicitReturnArrows": true,
|
|
525
617
|
"avoidQuotes": true
|
|
526
618
|
}
|
|
527
619
|
],
|
|
@@ -556,14 +648,10 @@ export default [
|
|
|
556
648
|
"allowNamedFunctions": true
|
|
557
649
|
}
|
|
558
650
|
],
|
|
559
|
-
"prefer-const":
|
|
560
|
-
"error",
|
|
561
|
-
{
|
|
562
|
-
"destructuring": "all"
|
|
563
|
-
}
|
|
564
|
-
],
|
|
651
|
+
"prefer-const": "error",
|
|
565
652
|
"prefer-exponentiation-operator": "error",
|
|
566
653
|
"prefer-named-capture-group": "error",
|
|
654
|
+
"prefer-numeric-literals": "error",
|
|
567
655
|
"prefer-object-has-own": "error",
|
|
568
656
|
"prefer-object-spread": "error",
|
|
569
657
|
"prefer-regex-literals": "error",
|
|
@@ -572,41 +660,74 @@ export default [
|
|
|
572
660
|
"prefer-template": "error",
|
|
573
661
|
"preserve-caught-error": "error",
|
|
574
662
|
"radix": "error",
|
|
575
|
-
"react-
|
|
576
|
-
"react-
|
|
577
|
-
"react-
|
|
578
|
-
"react-
|
|
579
|
-
"react-
|
|
580
|
-
"react-
|
|
581
|
-
"react-
|
|
582
|
-
"react-
|
|
583
|
-
"react-hooks/
|
|
584
|
-
"react-
|
|
585
|
-
"react-
|
|
586
|
-
"react-
|
|
587
|
-
"react-
|
|
663
|
+
"react-hooks/config": "error",
|
|
664
|
+
"react-hooks/error-boundaries": "error",
|
|
665
|
+
"react-hooks/gating": "error",
|
|
666
|
+
"react-hooks/globals": "error",
|
|
667
|
+
"react-hooks/immutability": "error",
|
|
668
|
+
"react-hooks/incompatible-library": "warn",
|
|
669
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
670
|
+
"react-hooks/purity": "error",
|
|
671
|
+
"react-hooks/refs": "error",
|
|
672
|
+
"react-hooks/set-state-in-effect": "error",
|
|
673
|
+
"react-hooks/set-state-in-render": "error",
|
|
674
|
+
"react-hooks/static-components": "error",
|
|
675
|
+
"react-hooks/unsupported-syntax": "warn",
|
|
676
|
+
"react-hooks/use-memo": "error",
|
|
677
|
+
"react-hooks/void-use-memo": "error",
|
|
588
678
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
589
679
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
590
680
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
591
|
-
"react-you-might-not-need-an-effect/no-empty-effect": "error",
|
|
592
681
|
"react-you-might-not-need-an-effect/no-event-handler": "error",
|
|
682
|
+
"react-you-might-not-need-an-effect/no-external-store-subscription": "error",
|
|
593
683
|
"react-you-might-not-need-an-effect/no-initialize-state": "error",
|
|
594
684
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
595
685
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
596
686
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
597
|
-
"react/
|
|
687
|
+
"react/context-name": "warn",
|
|
688
|
+
"react/function-definition": "error",
|
|
689
|
+
"react/id-name": "warn",
|
|
690
|
+
"react/jsx-key-before-spread": "error",
|
|
691
|
+
"react/jsx-no-children-prop-with-children": "error",
|
|
692
|
+
"react/jsx-no-leaked-dollar": "warn",
|
|
693
|
+
"react/jsx-no-leaked-render": "error",
|
|
694
|
+
"react/jsx-no-leaked-semicolon": "warn",
|
|
598
695
|
"react/no-access-state-in-setstate": "error",
|
|
696
|
+
"react/no-children-count": "warn",
|
|
697
|
+
"react/no-children-for-each": "warn",
|
|
698
|
+
"react/no-children-map": "warn",
|
|
699
|
+
"react/no-children-only": "warn",
|
|
700
|
+
"react/no-children-to-array": "warn",
|
|
701
|
+
"react/no-class-component": "error",
|
|
702
|
+
"react/no-component-will-mount": "error",
|
|
703
|
+
"react/no-component-will-receive-props": "error",
|
|
704
|
+
"react/no-component-will-update": "error",
|
|
599
705
|
"react/no-context-provider": "error",
|
|
706
|
+
"react/no-create-ref": "error",
|
|
600
707
|
"react/no-duplicate-key": "error",
|
|
601
|
-
"react/no-
|
|
602
|
-
"react/no-
|
|
603
|
-
"react/no-
|
|
604
|
-
"react/no-
|
|
605
|
-
"react/no-
|
|
606
|
-
"react/no-
|
|
708
|
+
"react/no-flush-sync": "error",
|
|
709
|
+
"react/no-hydrate": "error",
|
|
710
|
+
"react/no-implicit-key": "error",
|
|
711
|
+
"react/no-leaked-event-listener": "error",
|
|
712
|
+
"react/no-leaked-fetch": "warn",
|
|
713
|
+
"react/no-leaked-intersection-observer": "warn",
|
|
714
|
+
"react/no-leaked-interval": "error",
|
|
715
|
+
"react/no-leaked-resize-observer": "error",
|
|
716
|
+
"react/no-leaked-timeout": "error",
|
|
717
|
+
"react/no-misused-capture-owner-stack": "error",
|
|
718
|
+
"react/no-nested-lazy-component-declarations": "error",
|
|
719
|
+
"react/no-render": "error",
|
|
720
|
+
"react/no-unnecessary-use-prefix": "warn",
|
|
721
|
+
"react/no-unsafe-component-will-mount": "warn",
|
|
722
|
+
"react/no-unsafe-component-will-receive-props": "warn",
|
|
723
|
+
"react/no-unsafe-component-will-update": "warn",
|
|
724
|
+
"react/no-unsafe-iframe-sandbox": "warn",
|
|
725
|
+
"react/no-unused-class-component-members": "warn",
|
|
726
|
+
"react/no-unused-props": "warn",
|
|
607
727
|
"react/no-unused-state": "error",
|
|
608
728
|
"react/no-use-context": "error",
|
|
609
|
-
"react/no-
|
|
729
|
+
"react/no-use-form-state": "error",
|
|
730
|
+
"react/ref-name": "warn",
|
|
610
731
|
"regexp/confusing-quantifier": "warn",
|
|
611
732
|
"regexp/control-character-escape": "error",
|
|
612
733
|
"regexp/match-any": "error",
|
|
@@ -734,16 +855,9 @@ export default [
|
|
|
734
855
|
"sonarjs/public-static-readonly": "error",
|
|
735
856
|
"sonarjs/reduce-initial-value": "error",
|
|
736
857
|
"symbol-description": "error",
|
|
737
|
-
"unicorn/custom-error-definition": "error",
|
|
738
858
|
"unicorn/no-array-push-push": "error",
|
|
859
|
+
"unicorn/no-for-each": "error",
|
|
739
860
|
"unicorn/no-for-loop": "error",
|
|
740
|
-
"unicorn/prefer-export-from": [
|
|
741
|
-
"error",
|
|
742
|
-
{
|
|
743
|
-
"ignoreUsedVariables": true
|
|
744
|
-
}
|
|
745
|
-
],
|
|
746
|
-
"unicorn/prefer-import-meta-properties": "error",
|
|
747
861
|
"unicorn/prefer-switch": [
|
|
748
862
|
"error",
|
|
749
863
|
{
|
|
@@ -763,12 +877,16 @@ export default [
|
|
|
763
877
|
rules: {
|
|
764
878
|
"@typescript-eslint/await-thenable": "off",
|
|
765
879
|
"@typescript-eslint/consistent-return": "off",
|
|
880
|
+
"@typescript-eslint/consistent-type-exports": "off",
|
|
766
881
|
"@typescript-eslint/dot-notation": "off",
|
|
882
|
+
"@typescript-eslint/member-ordering": "off",
|
|
883
|
+
"@typescript-eslint/naming-convention": "off",
|
|
767
884
|
"@typescript-eslint/no-array-delete": "off",
|
|
768
885
|
"@typescript-eslint/no-base-to-string": "off",
|
|
769
886
|
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
770
887
|
"@typescript-eslint/no-deprecated": "off",
|
|
771
888
|
"@typescript-eslint/no-duplicate-type-constituents": "off",
|
|
889
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
772
890
|
"@typescript-eslint/no-for-in-array": "off",
|
|
773
891
|
"@typescript-eslint/no-implied-eval": "off",
|
|
774
892
|
"@typescript-eslint/no-meaningless-void-operator": "off",
|
|
@@ -790,6 +908,7 @@ export default [
|
|
|
790
908
|
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
791
909
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
792
910
|
"@typescript-eslint/no-unsafe-return": "off",
|
|
911
|
+
"@typescript-eslint/no-unsafe-type-assertion": "off",
|
|
793
912
|
"@typescript-eslint/no-unsafe-unary-minus": "off",
|
|
794
913
|
"@typescript-eslint/no-useless-default-assignment": "off",
|
|
795
914
|
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
@@ -800,26 +919,44 @@ export default [
|
|
|
800
919
|
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
801
920
|
"@typescript-eslint/prefer-optional-chain": "off",
|
|
802
921
|
"@typescript-eslint/prefer-promise-reject-errors": "off",
|
|
922
|
+
"@typescript-eslint/prefer-readonly": "off",
|
|
803
923
|
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
804
924
|
"@typescript-eslint/prefer-reduce-type-parameter": "off",
|
|
805
925
|
"@typescript-eslint/prefer-regexp-exec": "off",
|
|
806
926
|
"@typescript-eslint/prefer-return-this-type": "off",
|
|
807
927
|
"@typescript-eslint/prefer-string-starts-ends-with": "off",
|
|
928
|
+
"@typescript-eslint/promise-function-async": "off",
|
|
808
929
|
"@typescript-eslint/related-getter-setter-pairs": "off",
|
|
930
|
+
"@typescript-eslint/require-array-sort-compare": "off",
|
|
809
931
|
"@typescript-eslint/require-await": "off",
|
|
810
932
|
"@typescript-eslint/restrict-plus-operands": "off",
|
|
811
933
|
"@typescript-eslint/restrict-template-expressions": "off",
|
|
812
934
|
"@typescript-eslint/return-await": "off",
|
|
813
935
|
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
814
936
|
"@typescript-eslint/strict-void-return": "off",
|
|
937
|
+
"@typescript-eslint/switch-exhaustiveness-check": "off",
|
|
815
938
|
"@typescript-eslint/unbound-method": "off",
|
|
816
939
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
817
|
-
"
|
|
940
|
+
"dot-notation": "off",
|
|
941
|
+
"no-array-constructor": "off",
|
|
818
942
|
"no-dupe-args": "error",
|
|
943
|
+
"no-empty-function": "off",
|
|
944
|
+
"no-implied-eval": "off",
|
|
819
945
|
"no-new-symbol": "off",
|
|
820
946
|
"no-redeclare": "error",
|
|
947
|
+
"no-return-await": "off",
|
|
948
|
+
"no-shadow": "off",
|
|
949
|
+
"no-throw-literal": "off",
|
|
821
950
|
"no-undef": "error",
|
|
822
|
-
"no-
|
|
951
|
+
"no-useless-constructor": "off",
|
|
952
|
+
"prefer-const": [
|
|
953
|
+
"error",
|
|
954
|
+
{
|
|
955
|
+
"destructuring": "all"
|
|
956
|
+
}
|
|
957
|
+
],
|
|
958
|
+
"prefer-promise-reject-errors": "off",
|
|
959
|
+
"require-await": "off"
|
|
823
960
|
},
|
|
824
961
|
},
|
|
825
962
|
|
|
@@ -866,8 +1003,7 @@ export default [
|
|
|
866
1003
|
"vitest/prefer-strict-equal": "error",
|
|
867
1004
|
"vitest/prefer-to-be": "error",
|
|
868
1005
|
"vitest/prefer-to-have-length": "error",
|
|
869
|
-
"vitest/require-top-level-describe": "error"
|
|
870
|
-
"vitest/valid-title": "error"
|
|
1006
|
+
"vitest/require-top-level-describe": "error"
|
|
871
1007
|
},
|
|
872
1008
|
},
|
|
873
1009
|
|
|
@@ -1048,7 +1184,86 @@ export default [
|
|
|
1048
1184
|
// Markdown/MDX code block linting
|
|
1049
1185
|
{
|
|
1050
1186
|
...mdxPlugin.flatCodeBlocks,
|
|
1187
|
+
languageOptions: {
|
|
1188
|
+
...mdxPlugin.flatCodeBlocks.languageOptions,
|
|
1189
|
+
parserOptions: {
|
|
1190
|
+
...mdxPlugin.flatCodeBlocks.languageOptions?.parserOptions,
|
|
1191
|
+
projectService: false,
|
|
1192
|
+
},
|
|
1193
|
+
},
|
|
1051
1194
|
rules: {
|
|
1195
|
+
...{
|
|
1196
|
+
"@typescript-eslint/await-thenable": "off",
|
|
1197
|
+
"@typescript-eslint/consistent-type-exports": "off",
|
|
1198
|
+
"@typescript-eslint/dot-notation": "off",
|
|
1199
|
+
"@typescript-eslint/member-ordering": "off",
|
|
1200
|
+
"@typescript-eslint/naming-convention": "off",
|
|
1201
|
+
"@typescript-eslint/no-array-delete": "off",
|
|
1202
|
+
"@typescript-eslint/no-base-to-string": "off",
|
|
1203
|
+
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
1204
|
+
"@typescript-eslint/no-deprecated": "off",
|
|
1205
|
+
"@typescript-eslint/no-duplicate-type-constituents": "off",
|
|
1206
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
1207
|
+
"@typescript-eslint/no-for-in-array": "off",
|
|
1208
|
+
"@typescript-eslint/no-implied-eval": "off",
|
|
1209
|
+
"@typescript-eslint/no-meaningless-void-operator": "off",
|
|
1210
|
+
"@typescript-eslint/no-misused-spread": "off",
|
|
1211
|
+
"@typescript-eslint/no-mixed-enums": "off",
|
|
1212
|
+
"@typescript-eslint/no-redundant-type-constituents": "off",
|
|
1213
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
|
|
1214
|
+
"@typescript-eslint/no-unnecessary-condition": "off",
|
|
1215
|
+
"@typescript-eslint/no-unnecessary-qualifier": "off",
|
|
1216
|
+
"@typescript-eslint/no-unnecessary-template-expression": "off",
|
|
1217
|
+
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
1218
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
1219
|
+
"@typescript-eslint/no-unnecessary-type-conversion": "off",
|
|
1220
|
+
"@typescript-eslint/no-unnecessary-type-parameters": "off",
|
|
1221
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
1222
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
1223
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
1224
|
+
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
1225
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
1226
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
1227
|
+
"@typescript-eslint/no-unsafe-type-assertion": "off",
|
|
1228
|
+
"@typescript-eslint/no-unsafe-unary-minus": "off",
|
|
1229
|
+
"@typescript-eslint/no-useless-default-assignment": "off",
|
|
1230
|
+
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
1231
|
+
"@typescript-eslint/only-throw-error": "off",
|
|
1232
|
+
"@typescript-eslint/prefer-find": "off",
|
|
1233
|
+
"@typescript-eslint/prefer-includes": "off",
|
|
1234
|
+
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
1235
|
+
"@typescript-eslint/prefer-optional-chain": "off",
|
|
1236
|
+
"@typescript-eslint/prefer-promise-reject-errors": "off",
|
|
1237
|
+
"@typescript-eslint/prefer-readonly": "off",
|
|
1238
|
+
"@typescript-eslint/prefer-reduce-type-parameter": "off",
|
|
1239
|
+
"@typescript-eslint/prefer-regexp-exec": "off",
|
|
1240
|
+
"@typescript-eslint/prefer-return-this-type": "off",
|
|
1241
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "off",
|
|
1242
|
+
"@typescript-eslint/promise-function-async": "off",
|
|
1243
|
+
"@typescript-eslint/related-getter-setter-pairs": "off",
|
|
1244
|
+
"@typescript-eslint/require-array-sort-compare": "off",
|
|
1245
|
+
"@typescript-eslint/require-await": "off",
|
|
1246
|
+
"@typescript-eslint/restrict-plus-operands": "off",
|
|
1247
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
1248
|
+
"@typescript-eslint/return-await": "off",
|
|
1249
|
+
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
1250
|
+
"@typescript-eslint/strict-void-return": "off",
|
|
1251
|
+
"@typescript-eslint/switch-exhaustiveness-check": "off",
|
|
1252
|
+
"@typescript-eslint/unbound-method": "off",
|
|
1253
|
+
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
1254
|
+
"dot-notation": "off",
|
|
1255
|
+
"no-array-constructor": "off",
|
|
1256
|
+
"no-empty-function": "off",
|
|
1257
|
+
"no-implied-eval": "off",
|
|
1258
|
+
"no-return-await": "off",
|
|
1259
|
+
"no-shadow": "off",
|
|
1260
|
+
"no-throw-literal": "off",
|
|
1261
|
+
"no-useless-constructor": "off",
|
|
1262
|
+
"prefer-promise-reject-errors": "off",
|
|
1263
|
+
"require-await": "off",
|
|
1264
|
+
"strict": "off",
|
|
1265
|
+
"unicode-bom": "off"
|
|
1266
|
+
},
|
|
1052
1267
|
...mdxPlugin.flatCodeBlocks.rules,
|
|
1053
1268
|
"eol-last": "off",
|
|
1054
1269
|
"no-undef": "off",
|
|
@@ -1061,12 +1276,14 @@ export default [
|
|
|
1061
1276
|
},
|
|
1062
1277
|
|
|
1063
1278
|
// OxLint integration — disables rules already covered by OxLint
|
|
1064
|
-
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint"
|
|
1065
|
-
...[oxlintPlugin.configs["flat/react"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-react"
|
|
1066
|
-
...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-jsx-a11y"
|
|
1067
|
-
...[oxlintPlugin.configs["flat/
|
|
1068
|
-
...[oxlintPlugin.configs["flat/
|
|
1069
|
-
...[oxlintPlugin.configs["flat/
|
|
1070
|
-
...[oxlintPlugin.configs["flat/
|
|
1279
|
+
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1280
|
+
...[oxlintPlugin.configs["flat/react"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1281
|
+
...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsx-a11y" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1282
|
+
...[oxlintPlugin.configs["flat/react-hooks"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react-hooks" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1283
|
+
...[oxlintPlugin.configs["flat/react-perf"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react-perf" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1284
|
+
...[oxlintPlugin.configs["flat/typescript"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-typescript" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1285
|
+
...[oxlintPlugin.configs["flat/unicorn"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-unicorn" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1286
|
+
...[oxlintPlugin.configs["flat/import"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-import" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1287
|
+
...[oxlintPlugin.configs["flat/jsdoc"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsdoc" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1071
1288
|
|
|
1072
1289
|
]
|