eslint-config-setup 0.4.0 → 0.5.1
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 +22 -6
- package/dist/configs/0b23ff88.js +6 -23
- package/dist/configs/12c62446.js +5 -22
- package/dist/configs/196d687e.js +33 -48
- package/dist/configs/1c3f743c.js +6 -23
- package/dist/configs/2f6f3a82.js +32 -45
- package/dist/configs/4eb62e57.js +7 -24
- package/dist/configs/52762a42.js +6 -4
- package/dist/configs/532f50a4.js +30 -20
- package/dist/configs/5a302873.js +31 -44
- package/dist/configs/6bc0d588.js +37 -21
- package/dist/configs/91e82988.js +30 -20
- package/dist/configs/c2fecd3d.js +6 -4
- package/dist/configs/cde010b4.js +5 -2
- package/dist/configs/d537b683.js +37 -21
- package/dist/configs/db69ebb6.js +34 -49
- package/dist/configs/e4b137fa.js +5 -2
- package/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/dist/modules.d.ts +9 -7
- package/dist/modules.js +80 -38
- package/dist/modules.js.map +1 -1
- package/dist/oxlint-configs/3047b7d6.json +30 -2
- package/dist/oxlint-configs/58d5e03b.json +31 -3
- package/dist/oxlint-configs/78b40daa.json +35 -5
- package/dist/oxlint-configs/7ff0d87e.json +45 -3
- package/dist/oxlint-configs/85912bf0.json +44 -2
- package/dist/oxlint-configs/9dc42dc3.json +35 -5
- package/dist/oxlint-configs/d46cb9b7.json +57 -6
- package/dist/oxlint-configs/ef643c60.json +57 -6
- package/package.json +37 -35
package/dist/configs/5a302873.js
CHANGED
|
@@ -14,6 +14,7 @@ import packageJsonPlugin from "eslint-plugin-package-json"
|
|
|
14
14
|
import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
15
15
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
16
16
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
17
|
+
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
17
18
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
18
19
|
import securityPlugin from "eslint-plugin-security"
|
|
19
20
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
@@ -25,7 +26,7 @@ import unicornPlugin from "eslint-plugin-unicorn"
|
|
|
25
26
|
import unusedImportsPlugin from "eslint-plugin-unused-imports"
|
|
26
27
|
import vitestPlugin from "@vitest/eslint-plugin"
|
|
27
28
|
|
|
28
|
-
// React compat plugin —
|
|
29
|
+
// React compat plugin — maps @eslint-react rule families into the `react/` namespace
|
|
29
30
|
// and aliases rules to legacy eslint-plugin-react names for OxLint compatibility.
|
|
30
31
|
const reactCompatPlugin = (() => {
|
|
31
32
|
const core = eslintReactPlugin.rules
|
|
@@ -51,7 +52,6 @@ const reactCompatPlugin = (() => {
|
|
|
51
52
|
"no-unstable-nested-components": [core, "no-nested-component-definitions"],
|
|
52
53
|
"display-name": [core, "no-missing-component-display-name"],
|
|
53
54
|
"forward-ref-uses-ref": [core, "no-forward-ref"],
|
|
54
|
-
"destructuring-assignment": [core, "prefer-destructuring-assignment"],
|
|
55
55
|
"no-did-mount-set-state": [core, "no-set-state-in-component-did-mount"],
|
|
56
56
|
"no-did-update-set-state": [core, "no-set-state-in-component-did-update"],
|
|
57
57
|
"no-will-update-set-state": [core, "no-set-state-in-component-will-update"],
|
|
@@ -73,7 +73,7 @@ const reactCompatPlugin = (() => {
|
|
|
73
73
|
// Identical-name aliases (core rules where legacy name = @eslint-react name)
|
|
74
74
|
const identicalCore = [
|
|
75
75
|
"no-access-state-in-setstate", "no-array-index-key",
|
|
76
|
-
"no-direct-mutation-state",
|
|
76
|
+
"no-direct-mutation-state",
|
|
77
77
|
"no-unused-class-component-members", "no-unused-state",
|
|
78
78
|
]
|
|
79
79
|
for (const n of identicalCore) aliases[n] = [core, n]
|
|
@@ -129,6 +129,7 @@ export default [
|
|
|
129
129
|
"jsdoc": jsdocPlugin,
|
|
130
130
|
"perfectionist": perfectionistPlugin,
|
|
131
131
|
"react": reactCompatPlugin,
|
|
132
|
+
"react-hooks": reactHooksPlugin,
|
|
132
133
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
133
134
|
"regexp": regexpPlugin,
|
|
134
135
|
"security": securityPlugin,
|
|
@@ -172,10 +173,6 @@ export default [
|
|
|
172
173
|
}
|
|
173
174
|
],
|
|
174
175
|
"@typescript-eslint/dot-notation": "error",
|
|
175
|
-
"@typescript-eslint/method-signature-style": [
|
|
176
|
-
"error",
|
|
177
|
-
"property"
|
|
178
|
-
],
|
|
179
176
|
"@typescript-eslint/no-array-delete": "error",
|
|
180
177
|
"@typescript-eslint/no-base-to-string": "error",
|
|
181
178
|
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
@@ -304,7 +301,6 @@ export default [
|
|
|
304
301
|
"getBeforeSet"
|
|
305
302
|
],
|
|
306
303
|
"guard-for-in": "error",
|
|
307
|
-
"import/newline-after-import": "error",
|
|
308
304
|
"import/no-extraneous-dependencies": [
|
|
309
305
|
"error",
|
|
310
306
|
{
|
|
@@ -325,9 +321,7 @@ export default [
|
|
|
325
321
|
"jsdoc/reject-function-type": "error",
|
|
326
322
|
"jsdoc/require-next-type": "error",
|
|
327
323
|
"jsdoc/require-returns-check": "error",
|
|
328
|
-
"jsdoc/require-throws-type": "error",
|
|
329
324
|
"jsdoc/require-yields-check": "error",
|
|
330
|
-
"jsdoc/require-yields-type": "error",
|
|
331
325
|
"jsdoc/ts-no-empty-object-type": "error",
|
|
332
326
|
"jsdoc/valid-types": "error",
|
|
333
327
|
"max-depth": [
|
|
@@ -438,24 +432,36 @@ export default [
|
|
|
438
432
|
"prefer-template": "warn",
|
|
439
433
|
"preserve-caught-error": "error",
|
|
440
434
|
"radix": "error",
|
|
435
|
+
"react-hooks/config": "error",
|
|
436
|
+
"react-hooks/error-boundaries": "error",
|
|
437
|
+
"react-hooks/gating": "error",
|
|
438
|
+
"react-hooks/globals": "error",
|
|
439
|
+
"react-hooks/immutability": "error",
|
|
440
|
+
"react-hooks/incompatible-library": "warn",
|
|
441
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
442
|
+
"react-hooks/purity": "error",
|
|
443
|
+
"react-hooks/refs": "error",
|
|
444
|
+
"react-hooks/set-state-in-effect": "error",
|
|
445
|
+
"react-hooks/set-state-in-render": "error",
|
|
446
|
+
"react-hooks/static-components": "error",
|
|
447
|
+
"react-hooks/unsupported-syntax": "warn",
|
|
448
|
+
"react-hooks/use-memo": "error",
|
|
449
|
+
"react-hooks/void-use-memo": "error",
|
|
441
450
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
442
451
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
443
452
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
444
|
-
"react-you-might-not-need-an-effect/no-empty-effect": "error",
|
|
445
453
|
"react-you-might-not-need-an-effect/no-event-handler": "error",
|
|
454
|
+
"react-you-might-not-need-an-effect/no-external-store-subscription": "error",
|
|
446
455
|
"react-you-might-not-need-an-effect/no-initialize-state": "error",
|
|
447
456
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
448
457
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
449
458
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
450
|
-
"react/component-hook-factories": "error",
|
|
451
459
|
"react/context-name": "warn",
|
|
452
|
-
"react/destructuring-assignment": "warn",
|
|
453
|
-
"react/error-boundaries": "error",
|
|
454
|
-
"react/exhaustive-deps": "warn",
|
|
455
460
|
"react/function-definition": "error",
|
|
456
461
|
"react/id-name": "warn",
|
|
457
462
|
"react/jsx-key-before-spread": "error",
|
|
458
463
|
"react/jsx-no-children-prop-with-children": "error",
|
|
464
|
+
"react/jsx-no-leaked-dollar": "warn",
|
|
459
465
|
"react/jsx-no-leaked-render": "error",
|
|
460
466
|
"react/jsx-no-leaked-semicolon": "warn",
|
|
461
467
|
"react/no-access-state-in-setstate": "error",
|
|
@@ -470,39 +476,29 @@ export default [
|
|
|
470
476
|
"react/no-component-will-update": "error",
|
|
471
477
|
"react/no-context-provider": "warn",
|
|
472
478
|
"react/no-create-ref": "error",
|
|
473
|
-
"react/no-did-update-set-state": "warn",
|
|
474
479
|
"react/no-duplicate-key": "error",
|
|
475
480
|
"react/no-flush-sync": "error",
|
|
476
481
|
"react/no-hydrate": "error",
|
|
477
482
|
"react/no-implicit-key": "error",
|
|
478
483
|
"react/no-leaked-event-listener": "warn",
|
|
484
|
+
"react/no-leaked-fetch": "warn",
|
|
485
|
+
"react/no-leaked-intersection-observer": "warn",
|
|
479
486
|
"react/no-leaked-interval": "warn",
|
|
480
487
|
"react/no-leaked-resize-observer": "warn",
|
|
481
488
|
"react/no-leaked-timeout": "warn",
|
|
482
489
|
"react/no-misused-capture-owner-stack": "error",
|
|
483
490
|
"react/no-nested-lazy-component-declarations": "error",
|
|
484
|
-
"react/no-object-type-as-default-prop": "warn",
|
|
485
491
|
"react/no-render": "error",
|
|
486
|
-
"react/no-unnecessary-use-callback": "warn",
|
|
487
|
-
"react/no-unnecessary-use-memo": "warn",
|
|
488
492
|
"react/no-unnecessary-use-prefix": "warn",
|
|
489
493
|
"react/no-unsafe-component-will-mount": "warn",
|
|
490
494
|
"react/no-unsafe-component-will-receive-props": "warn",
|
|
491
495
|
"react/no-unsafe-component-will-update": "warn",
|
|
492
496
|
"react/no-unsafe-iframe-sandbox": "warn",
|
|
493
|
-
"react/no-unstable-nested-components": "error",
|
|
494
497
|
"react/no-unused-class-component-members": "warn",
|
|
495
498
|
"react/no-unused-props": "warn",
|
|
496
|
-
"react/no-unused-state": "warn",
|
|
497
499
|
"react/no-use-context": "warn",
|
|
498
500
|
"react/no-use-form-state": "error",
|
|
499
|
-
"react/purity": "warn",
|
|
500
501
|
"react/ref-name": "warn",
|
|
501
|
-
"react/rules-of-hooks": "error",
|
|
502
|
-
"react/set-state-in-effect": "warn",
|
|
503
|
-
"react/set-state-in-render": "error",
|
|
504
|
-
"react/unsupported-syntax": "error",
|
|
505
|
-
"react/use-memo": "error",
|
|
506
502
|
"regexp/confusing-quantifier": "warn",
|
|
507
503
|
"regexp/control-character-escape": "error",
|
|
508
504
|
"regexp/match-any": "error",
|
|
@@ -608,12 +604,6 @@ export default [
|
|
|
608
604
|
"sonarjs/reduce-initial-value": "error",
|
|
609
605
|
"symbol-description": "error",
|
|
610
606
|
"unicorn/no-for-loop": "warn",
|
|
611
|
-
"unicorn/prefer-export-from": [
|
|
612
|
-
"error",
|
|
613
|
-
{
|
|
614
|
-
"ignoreUsedVariables": true
|
|
615
|
-
}
|
|
616
|
-
],
|
|
617
607
|
"unused-imports/no-unused-imports": "error",
|
|
618
608
|
"yoda": "error"
|
|
619
609
|
},
|
|
@@ -628,7 +618,6 @@ export default [
|
|
|
628
618
|
"@typescript-eslint/consistent-return": "off",
|
|
629
619
|
"@typescript-eslint/consistent-type-exports": "off",
|
|
630
620
|
"@typescript-eslint/dot-notation": "off",
|
|
631
|
-
"@typescript-eslint/method-signature-style": "off",
|
|
632
621
|
"@typescript-eslint/naming-convention": "off",
|
|
633
622
|
"@typescript-eslint/no-array-delete": "off",
|
|
634
623
|
"@typescript-eslint/no-base-to-string": "off",
|
|
@@ -687,7 +676,6 @@ export default [
|
|
|
687
676
|
"@typescript-eslint/unbound-method": "off",
|
|
688
677
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
689
678
|
"dot-notation": "off",
|
|
690
|
-
"getter-return": "error",
|
|
691
679
|
"no-array-constructor": "off",
|
|
692
680
|
"no-dupe-args": "error",
|
|
693
681
|
"no-empty-function": "off",
|
|
@@ -698,7 +686,6 @@ export default [
|
|
|
698
686
|
"no-shadow": "off",
|
|
699
687
|
"no-throw-literal": "off",
|
|
700
688
|
"no-undef": "error",
|
|
701
|
-
"no-unreachable": "error",
|
|
702
689
|
"no-useless-constructor": "off",
|
|
703
690
|
"prefer-const": [
|
|
704
691
|
"error",
|
|
@@ -932,7 +919,6 @@ export default [
|
|
|
932
919
|
"@typescript-eslint/await-thenable": "off",
|
|
933
920
|
"@typescript-eslint/consistent-type-exports": "off",
|
|
934
921
|
"@typescript-eslint/dot-notation": "off",
|
|
935
|
-
"@typescript-eslint/method-signature-style": "off",
|
|
936
922
|
"@typescript-eslint/no-array-delete": "off",
|
|
937
923
|
"@typescript-eslint/no-base-to-string": "off",
|
|
938
924
|
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
@@ -1011,12 +997,13 @@ export default [
|
|
|
1011
997
|
},
|
|
1012
998
|
|
|
1013
999
|
// OxLint integration — disables rules already covered by OxLint
|
|
1014
|
-
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint"
|
|
1015
|
-
...[oxlintPlugin.configs["flat/react"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-react"
|
|
1016
|
-
...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-jsx-a11y"
|
|
1017
|
-
...[oxlintPlugin.configs["flat/
|
|
1018
|
-
...[oxlintPlugin.configs["flat/
|
|
1019
|
-
...[oxlintPlugin.configs["flat/
|
|
1020
|
-
...[oxlintPlugin.configs["flat/
|
|
1000
|
+
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1001
|
+
...[oxlintPlugin.configs["flat/react"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1002
|
+
...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsx-a11y" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1003
|
+
...[oxlintPlugin.configs["flat/react-hooks"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react-hooks" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1004
|
+
...[oxlintPlugin.configs["flat/typescript"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-typescript" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1005
|
+
...[oxlintPlugin.configs["flat/unicorn"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-unicorn" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1006
|
+
...[oxlintPlugin.configs["flat/import"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-import" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1007
|
+
...[oxlintPlugin.configs["flat/jsdoc"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsdoc" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1021
1008
|
|
|
1022
1009
|
]
|
package/dist/configs/6bc0d588.js
CHANGED
|
@@ -14,6 +14,8 @@ import packageJsonPlugin from "eslint-plugin-package-json"
|
|
|
14
14
|
import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
15
15
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
16
16
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
17
|
+
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
18
|
+
import reactPerfPlugin from "eslint-plugin-react-perf"
|
|
17
19
|
import reactRefreshPlugin from "eslint-plugin-react-refresh"
|
|
18
20
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
19
21
|
import securityPlugin from "eslint-plugin-security"
|
|
@@ -26,7 +28,7 @@ import unicornPlugin from "eslint-plugin-unicorn"
|
|
|
26
28
|
import unusedImportsPlugin from "eslint-plugin-unused-imports"
|
|
27
29
|
import vitestPlugin from "@vitest/eslint-plugin"
|
|
28
30
|
|
|
29
|
-
// React compat plugin —
|
|
31
|
+
// React compat plugin — maps @eslint-react rule families into the `react/` namespace
|
|
30
32
|
// and aliases rules to legacy eslint-plugin-react names for OxLint compatibility.
|
|
31
33
|
const reactCompatPlugin = (() => {
|
|
32
34
|
const core = eslintReactPlugin.rules
|
|
@@ -52,7 +54,6 @@ const reactCompatPlugin = (() => {
|
|
|
52
54
|
"no-unstable-nested-components": [core, "no-nested-component-definitions"],
|
|
53
55
|
"display-name": [core, "no-missing-component-display-name"],
|
|
54
56
|
"forward-ref-uses-ref": [core, "no-forward-ref"],
|
|
55
|
-
"destructuring-assignment": [core, "prefer-destructuring-assignment"],
|
|
56
57
|
"no-did-mount-set-state": [core, "no-set-state-in-component-did-mount"],
|
|
57
58
|
"no-did-update-set-state": [core, "no-set-state-in-component-did-update"],
|
|
58
59
|
"no-will-update-set-state": [core, "no-set-state-in-component-will-update"],
|
|
@@ -74,7 +75,7 @@ const reactCompatPlugin = (() => {
|
|
|
74
75
|
// Identical-name aliases (core rules where legacy name = @eslint-react name)
|
|
75
76
|
const identicalCore = [
|
|
76
77
|
"no-access-state-in-setstate", "no-array-index-key",
|
|
77
|
-
"no-direct-mutation-state",
|
|
78
|
+
"no-direct-mutation-state",
|
|
78
79
|
"no-unused-class-component-members", "no-unused-state",
|
|
79
80
|
]
|
|
80
81
|
for (const n of identicalCore) aliases[n] = [core, n]
|
|
@@ -131,6 +132,8 @@ export default [
|
|
|
131
132
|
"jsx-a11y": jsxA11yPlugin,
|
|
132
133
|
"perfectionist": perfectionistPlugin,
|
|
133
134
|
"react": reactCompatPlugin,
|
|
135
|
+
"react-hooks": reactHooksPlugin,
|
|
136
|
+
"react-perf": reactPerfPlugin,
|
|
134
137
|
"react-refresh": reactRefreshPlugin,
|
|
135
138
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
136
139
|
"regexp": regexpPlugin,
|
|
@@ -899,6 +902,27 @@ export default [
|
|
|
899
902
|
"prefer-template": "error",
|
|
900
903
|
"preserve-caught-error": "error",
|
|
901
904
|
"radix": "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",
|
|
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",
|
|
902
926
|
"react-refresh/only-export-components": [
|
|
903
927
|
"warn",
|
|
904
928
|
{
|
|
@@ -908,18 +932,14 @@ export default [
|
|
|
908
932
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
909
933
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
910
934
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
911
|
-
"react-you-might-not-need-an-effect/no-empty-effect": "error",
|
|
912
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",
|
|
913
937
|
"react-you-might-not-need-an-effect/no-initialize-state": "error",
|
|
914
938
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
915
939
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
916
940
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
917
941
|
"react/button-has-type": "error",
|
|
918
|
-
"react/component-hook-factories": "error",
|
|
919
942
|
"react/context-name": "warn",
|
|
920
|
-
"react/destructuring-assignment": "warn",
|
|
921
|
-
"react/error-boundaries": "error",
|
|
922
|
-
"react/exhaustive-deps": "warn",
|
|
923
943
|
"react/forward-ref-uses-ref": "error",
|
|
924
944
|
"react/function-definition": "error",
|
|
925
945
|
"react/hook-use-state": "warn",
|
|
@@ -930,6 +950,7 @@ export default [
|
|
|
930
950
|
"react/jsx-no-children-prop-with-children": "error",
|
|
931
951
|
"react/jsx-no-comment-textnodes": "error",
|
|
932
952
|
"react/jsx-no-constructed-context-values": "error",
|
|
953
|
+
"react/jsx-no-leaked-dollar": "warn",
|
|
933
954
|
"react/jsx-no-leaked-render": "error",
|
|
934
955
|
"react/jsx-no-leaked-semicolon": "warn",
|
|
935
956
|
"react/jsx-no-script-url": "warn",
|
|
@@ -961,6 +982,8 @@ export default [
|
|
|
961
982
|
"react/no-hydrate": "error",
|
|
962
983
|
"react/no-implicit-key": "error",
|
|
963
984
|
"react/no-leaked-event-listener": "error",
|
|
985
|
+
"react/no-leaked-fetch": "warn",
|
|
986
|
+
"react/no-leaked-intersection-observer": "warn",
|
|
964
987
|
"react/no-leaked-interval": "error",
|
|
965
988
|
"react/no-leaked-resize-observer": "error",
|
|
966
989
|
"react/no-leaked-timeout": "error",
|
|
@@ -968,12 +991,9 @@ export default [
|
|
|
968
991
|
"react/no-namespace": "error",
|
|
969
992
|
"react/no-nested-lazy-component-declarations": "error",
|
|
970
993
|
"react/no-object-type-as-default-prop": "error",
|
|
971
|
-
"react/no-redundant-should-component-update": "error",
|
|
972
994
|
"react/no-render": "error",
|
|
973
995
|
"react/no-render-return-value": "error",
|
|
974
996
|
"react/no-unknown-property": "error",
|
|
975
|
-
"react/no-unnecessary-use-callback": "warn",
|
|
976
|
-
"react/no-unnecessary-use-memo": "warn",
|
|
977
997
|
"react/no-unnecessary-use-prefix": "warn",
|
|
978
998
|
"react/no-unsafe-component-will-mount": "warn",
|
|
979
999
|
"react/no-unsafe-component-will-receive-props": "warn",
|
|
@@ -986,14 +1006,8 @@ export default [
|
|
|
986
1006
|
"react/no-use-context": "error",
|
|
987
1007
|
"react/no-use-form-state": "error",
|
|
988
1008
|
"react/no-will-update-set-state": "warn",
|
|
989
|
-
"react/purity": "warn",
|
|
990
1009
|
"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
1010
|
"react/style-prop-object": "error",
|
|
995
|
-
"react/unsupported-syntax": "error",
|
|
996
|
-
"react/use-memo": "error",
|
|
997
1011
|
"react/void-dom-elements-no-children": "error",
|
|
998
1012
|
"regexp/confusing-quantifier": "warn",
|
|
999
1013
|
"regexp/control-character-escape": "error",
|
|
@@ -1143,7 +1157,10 @@ export default [
|
|
|
1143
1157
|
"camelCase": true,
|
|
1144
1158
|
"pascalCase": true,
|
|
1145
1159
|
"kebabCase": true
|
|
1146
|
-
}
|
|
1160
|
+
},
|
|
1161
|
+
"ignore": [
|
|
1162
|
+
"__tests__"
|
|
1163
|
+
]
|
|
1147
1164
|
}
|
|
1148
1165
|
],
|
|
1149
1166
|
"unicorn/new-for-builtins": "error",
|
|
@@ -1151,12 +1168,12 @@ export default [
|
|
|
1151
1168
|
"unicorn/no-accessor-recursion": "error",
|
|
1152
1169
|
"unicorn/no-anonymous-default-export": "error",
|
|
1153
1170
|
"unicorn/no-array-callback-reference": "error",
|
|
1154
|
-
"unicorn/no-array-for-each": "error",
|
|
1155
1171
|
"unicorn/no-array-method-this-argument": "error",
|
|
1156
1172
|
"unicorn/no-array-push-push": "error",
|
|
1157
1173
|
"unicorn/no-array-reduce": "error",
|
|
1158
1174
|
"unicorn/no-await-expression-member": "error",
|
|
1159
1175
|
"unicorn/no-await-in-promise-methods": "error",
|
|
1176
|
+
"unicorn/no-for-each": "error",
|
|
1160
1177
|
"unicorn/no-for-loop": "error",
|
|
1161
1178
|
"unicorn/no-instanceof-builtins": "error",
|
|
1162
1179
|
"unicorn/no-invalid-fetch-options": "error",
|
|
@@ -1196,7 +1213,7 @@ export default [
|
|
|
1196
1213
|
"unicorn/prefer-export-from": [
|
|
1197
1214
|
"error",
|
|
1198
1215
|
{
|
|
1199
|
-
"
|
|
1216
|
+
"checkUsedVariables": false
|
|
1200
1217
|
}
|
|
1201
1218
|
],
|
|
1202
1219
|
"unicorn/prefer-global-this": "error",
|
|
@@ -1233,7 +1250,6 @@ export default [
|
|
|
1233
1250
|
],
|
|
1234
1251
|
"unicorn/prefer-top-level-await": "error",
|
|
1235
1252
|
"unicorn/prefer-type-error": "error",
|
|
1236
|
-
"unicorn/prevent-abbreviations": "error",
|
|
1237
1253
|
"unicorn/relative-url-style": "error",
|
|
1238
1254
|
"unicorn/switch-case-braces": "error",
|
|
1239
1255
|
"unicorn/text-encoding-identifier-case": "error",
|
package/dist/configs/91e82988.js
CHANGED
|
@@ -14,6 +14,7 @@ import packageJsonPlugin from "eslint-plugin-package-json"
|
|
|
14
14
|
import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
15
15
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
16
16
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
17
|
+
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
17
18
|
import reactRefreshPlugin from "eslint-plugin-react-refresh"
|
|
18
19
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
19
20
|
import securityPlugin from "eslint-plugin-security"
|
|
@@ -26,7 +27,7 @@ import unicornPlugin from "eslint-plugin-unicorn"
|
|
|
26
27
|
import unusedImportsPlugin from "eslint-plugin-unused-imports"
|
|
27
28
|
import vitestPlugin from "@vitest/eslint-plugin"
|
|
28
29
|
|
|
29
|
-
// React compat plugin —
|
|
30
|
+
// React compat plugin — maps @eslint-react rule families into the `react/` namespace
|
|
30
31
|
// and aliases rules to legacy eslint-plugin-react names for OxLint compatibility.
|
|
31
32
|
const reactCompatPlugin = (() => {
|
|
32
33
|
const core = eslintReactPlugin.rules
|
|
@@ -52,7 +53,6 @@ const reactCompatPlugin = (() => {
|
|
|
52
53
|
"no-unstable-nested-components": [core, "no-nested-component-definitions"],
|
|
53
54
|
"display-name": [core, "no-missing-component-display-name"],
|
|
54
55
|
"forward-ref-uses-ref": [core, "no-forward-ref"],
|
|
55
|
-
"destructuring-assignment": [core, "prefer-destructuring-assignment"],
|
|
56
56
|
"no-did-mount-set-state": [core, "no-set-state-in-component-did-mount"],
|
|
57
57
|
"no-did-update-set-state": [core, "no-set-state-in-component-did-update"],
|
|
58
58
|
"no-will-update-set-state": [core, "no-set-state-in-component-will-update"],
|
|
@@ -74,7 +74,7 @@ const reactCompatPlugin = (() => {
|
|
|
74
74
|
// Identical-name aliases (core rules where legacy name = @eslint-react name)
|
|
75
75
|
const identicalCore = [
|
|
76
76
|
"no-access-state-in-setstate", "no-array-index-key",
|
|
77
|
-
"no-direct-mutation-state",
|
|
77
|
+
"no-direct-mutation-state",
|
|
78
78
|
"no-unused-class-component-members", "no-unused-state",
|
|
79
79
|
]
|
|
80
80
|
for (const n of identicalCore) aliases[n] = [core, n]
|
|
@@ -131,6 +131,7 @@ export default [
|
|
|
131
131
|
"node": nodePlugin,
|
|
132
132
|
"perfectionist": perfectionistPlugin,
|
|
133
133
|
"react": reactCompatPlugin,
|
|
134
|
+
"react-hooks": reactHooksPlugin,
|
|
134
135
|
"react-refresh": reactRefreshPlugin,
|
|
135
136
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
136
137
|
"regexp": regexpPlugin,
|
|
@@ -670,6 +671,23 @@ export default [
|
|
|
670
671
|
"prefer-template": "warn",
|
|
671
672
|
"preserve-caught-error": "error",
|
|
672
673
|
"radix": "error",
|
|
674
|
+
"react-hooks/config": "error",
|
|
675
|
+
"react-hooks/error-boundaries": "error",
|
|
676
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
677
|
+
"react-hooks/gating": "error",
|
|
678
|
+
"react-hooks/globals": "error",
|
|
679
|
+
"react-hooks/immutability": "error",
|
|
680
|
+
"react-hooks/incompatible-library": "warn",
|
|
681
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
682
|
+
"react-hooks/purity": "error",
|
|
683
|
+
"react-hooks/refs": "error",
|
|
684
|
+
"react-hooks/rules-of-hooks": "error",
|
|
685
|
+
"react-hooks/set-state-in-effect": "error",
|
|
686
|
+
"react-hooks/set-state-in-render": "error",
|
|
687
|
+
"react-hooks/static-components": "error",
|
|
688
|
+
"react-hooks/unsupported-syntax": "warn",
|
|
689
|
+
"react-hooks/use-memo": "error",
|
|
690
|
+
"react-hooks/void-use-memo": "error",
|
|
673
691
|
"react-refresh/only-export-components": [
|
|
674
692
|
"warn",
|
|
675
693
|
{
|
|
@@ -679,18 +697,14 @@ export default [
|
|
|
679
697
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
680
698
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
681
699
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
682
|
-
"react-you-might-not-need-an-effect/no-empty-effect": "error",
|
|
683
700
|
"react-you-might-not-need-an-effect/no-event-handler": "error",
|
|
701
|
+
"react-you-might-not-need-an-effect/no-external-store-subscription": "error",
|
|
684
702
|
"react-you-might-not-need-an-effect/no-initialize-state": "error",
|
|
685
703
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
686
704
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
687
705
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
688
706
|
"react/button-has-type": "warn",
|
|
689
|
-
"react/component-hook-factories": "error",
|
|
690
707
|
"react/context-name": "warn",
|
|
691
|
-
"react/destructuring-assignment": "warn",
|
|
692
|
-
"react/error-boundaries": "error",
|
|
693
|
-
"react/exhaustive-deps": "warn",
|
|
694
708
|
"react/forward-ref-uses-ref": "warn",
|
|
695
709
|
"react/function-definition": "error",
|
|
696
710
|
"react/hook-use-state": "warn",
|
|
@@ -701,6 +715,7 @@ export default [
|
|
|
701
715
|
"react/jsx-no-children-prop-with-children": "error",
|
|
702
716
|
"react/jsx-no-comment-textnodes": "warn",
|
|
703
717
|
"react/jsx-no-constructed-context-values": "warn",
|
|
718
|
+
"react/jsx-no-leaked-dollar": "warn",
|
|
704
719
|
"react/jsx-no-leaked-render": "error",
|
|
705
720
|
"react/jsx-no-leaked-semicolon": "warn",
|
|
706
721
|
"react/jsx-no-script-url": "warn",
|
|
@@ -732,6 +747,8 @@ export default [
|
|
|
732
747
|
"react/no-hydrate": "error",
|
|
733
748
|
"react/no-implicit-key": "error",
|
|
734
749
|
"react/no-leaked-event-listener": "warn",
|
|
750
|
+
"react/no-leaked-fetch": "warn",
|
|
751
|
+
"react/no-leaked-intersection-observer": "warn",
|
|
735
752
|
"react/no-leaked-interval": "warn",
|
|
736
753
|
"react/no-leaked-resize-observer": "warn",
|
|
737
754
|
"react/no-leaked-timeout": "warn",
|
|
@@ -739,12 +756,9 @@ export default [
|
|
|
739
756
|
"react/no-namespace": "error",
|
|
740
757
|
"react/no-nested-lazy-component-declarations": "error",
|
|
741
758
|
"react/no-object-type-as-default-prop": "warn",
|
|
742
|
-
"react/no-redundant-should-component-update": "error",
|
|
743
759
|
"react/no-render": "error",
|
|
744
760
|
"react/no-render-return-value": "error",
|
|
745
761
|
"react/no-unknown-property": "error",
|
|
746
|
-
"react/no-unnecessary-use-callback": "warn",
|
|
747
|
-
"react/no-unnecessary-use-memo": "warn",
|
|
748
762
|
"react/no-unnecessary-use-prefix": "warn",
|
|
749
763
|
"react/no-unsafe-component-will-mount": "warn",
|
|
750
764
|
"react/no-unsafe-component-will-receive-props": "warn",
|
|
@@ -753,18 +767,11 @@ export default [
|
|
|
753
767
|
"react/no-unstable-nested-components": "error",
|
|
754
768
|
"react/no-unused-class-component-members": "warn",
|
|
755
769
|
"react/no-unused-props": "warn",
|
|
756
|
-
"react/no-unused-state": "warn",
|
|
757
770
|
"react/no-use-context": "warn",
|
|
758
771
|
"react/no-use-form-state": "error",
|
|
759
772
|
"react/no-will-update-set-state": "warn",
|
|
760
|
-
"react/purity": "warn",
|
|
761
773
|
"react/ref-name": "warn",
|
|
762
|
-
"react/rules-of-hooks": "error",
|
|
763
|
-
"react/set-state-in-effect": "warn",
|
|
764
|
-
"react/set-state-in-render": "error",
|
|
765
774
|
"react/style-prop-object": "error",
|
|
766
|
-
"react/unsupported-syntax": "error",
|
|
767
|
-
"react/use-memo": "error",
|
|
768
775
|
"react/void-dom-elements-no-children": "error",
|
|
769
776
|
"regexp/confusing-quantifier": "warn",
|
|
770
777
|
"regexp/control-character-escape": "error",
|
|
@@ -889,7 +896,10 @@ export default [
|
|
|
889
896
|
"camelCase": true,
|
|
890
897
|
"pascalCase": true,
|
|
891
898
|
"kebabCase": true
|
|
892
|
-
}
|
|
899
|
+
},
|
|
900
|
+
"ignore": [
|
|
901
|
+
"__tests__"
|
|
902
|
+
]
|
|
893
903
|
}
|
|
894
904
|
],
|
|
895
905
|
"unicorn/new-for-builtins": "error",
|
|
@@ -938,7 +948,7 @@ export default [
|
|
|
938
948
|
"unicorn/prefer-export-from": [
|
|
939
949
|
"error",
|
|
940
950
|
{
|
|
941
|
-
"
|
|
951
|
+
"checkUsedVariables": false
|
|
942
952
|
}
|
|
943
953
|
],
|
|
944
954
|
"unicorn/prefer-global-this": "error",
|
package/dist/configs/c2fecd3d.js
CHANGED
|
@@ -932,7 +932,10 @@ export default [
|
|
|
932
932
|
"camelCase": true,
|
|
933
933
|
"pascalCase": true,
|
|
934
934
|
"kebabCase": true
|
|
935
|
-
}
|
|
935
|
+
},
|
|
936
|
+
"ignore": [
|
|
937
|
+
"__tests__"
|
|
938
|
+
]
|
|
936
939
|
}
|
|
937
940
|
],
|
|
938
941
|
"unicorn/new-for-builtins": "error",
|
|
@@ -940,12 +943,12 @@ export default [
|
|
|
940
943
|
"unicorn/no-accessor-recursion": "error",
|
|
941
944
|
"unicorn/no-anonymous-default-export": "error",
|
|
942
945
|
"unicorn/no-array-callback-reference": "error",
|
|
943
|
-
"unicorn/no-array-for-each": "error",
|
|
944
946
|
"unicorn/no-array-method-this-argument": "error",
|
|
945
947
|
"unicorn/no-array-push-push": "error",
|
|
946
948
|
"unicorn/no-array-reduce": "error",
|
|
947
949
|
"unicorn/no-await-expression-member": "error",
|
|
948
950
|
"unicorn/no-await-in-promise-methods": "error",
|
|
951
|
+
"unicorn/no-for-each": "error",
|
|
949
952
|
"unicorn/no-for-loop": "error",
|
|
950
953
|
"unicorn/no-instanceof-builtins": "error",
|
|
951
954
|
"unicorn/no-invalid-fetch-options": "error",
|
|
@@ -985,7 +988,7 @@ export default [
|
|
|
985
988
|
"unicorn/prefer-export-from": [
|
|
986
989
|
"error",
|
|
987
990
|
{
|
|
988
|
-
"
|
|
991
|
+
"checkUsedVariables": false
|
|
989
992
|
}
|
|
990
993
|
],
|
|
991
994
|
"unicorn/prefer-global-this": "error",
|
|
@@ -1022,7 +1025,6 @@ export default [
|
|
|
1022
1025
|
],
|
|
1023
1026
|
"unicorn/prefer-top-level-await": "error",
|
|
1024
1027
|
"unicorn/prefer-type-error": "error",
|
|
1025
|
-
"unicorn/prevent-abbreviations": "error",
|
|
1026
1028
|
"unicorn/relative-url-style": "error",
|
|
1027
1029
|
"unicorn/switch-case-braces": "error",
|
|
1028
1030
|
"unicorn/text-encoding-identifier-case": "error",
|
package/dist/configs/cde010b4.js
CHANGED
|
@@ -653,7 +653,10 @@ export default [
|
|
|
653
653
|
"camelCase": true,
|
|
654
654
|
"pascalCase": true,
|
|
655
655
|
"kebabCase": true
|
|
656
|
-
}
|
|
656
|
+
},
|
|
657
|
+
"ignore": [
|
|
658
|
+
"__tests__"
|
|
659
|
+
]
|
|
657
660
|
}
|
|
658
661
|
],
|
|
659
662
|
"unicorn/new-for-builtins": "error",
|
|
@@ -702,7 +705,7 @@ export default [
|
|
|
702
705
|
"unicorn/prefer-export-from": [
|
|
703
706
|
"error",
|
|
704
707
|
{
|
|
705
|
-
"
|
|
708
|
+
"checkUsedVariables": false
|
|
706
709
|
}
|
|
707
710
|
],
|
|
708
711
|
"unicorn/prefer-global-this": "error",
|