eslint-config-setup 0.4.0 → 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 +22 -6
- package/dist/configs/0b23ff88.js +6 -22
- package/dist/configs/12c62446.js +5 -22
- package/dist/configs/196d687e.js +33 -47
- package/dist/configs/1c3f743c.js +6 -23
- package/dist/configs/2f6f3a82.js +32 -45
- package/dist/configs/4eb62e57.js +7 -23
- package/dist/configs/52762a42.js +6 -3
- package/dist/configs/532f50a4.js +30 -20
- package/dist/configs/5a302873.js +31 -44
- package/dist/configs/6bc0d588.js +37 -20
- package/dist/configs/91e82988.js +30 -20
- package/dist/configs/c2fecd3d.js +6 -3
- package/dist/configs/cde010b4.js +5 -2
- package/dist/configs/d537b683.js +37 -20
- package/dist/configs/db69ebb6.js +34 -48
- package/dist/configs/e4b137fa.js +5 -2
- package/dist/modules.d.ts +9 -7
- package/dist/modules.js +80 -37
- 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/2f6f3a82.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
|
"node": nodePlugin,
|
|
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,
|
|
@@ -173,10 +174,6 @@ export default [
|
|
|
173
174
|
}
|
|
174
175
|
],
|
|
175
176
|
"@typescript-eslint/dot-notation": "error",
|
|
176
|
-
"@typescript-eslint/method-signature-style": [
|
|
177
|
-
"error",
|
|
178
|
-
"property"
|
|
179
|
-
],
|
|
180
177
|
"@typescript-eslint/no-array-delete": "error",
|
|
181
178
|
"@typescript-eslint/no-base-to-string": "error",
|
|
182
179
|
"@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": [
|
|
@@ -467,24 +461,36 @@ export default [
|
|
|
467
461
|
"prefer-template": "warn",
|
|
468
462
|
"preserve-caught-error": "error",
|
|
469
463
|
"radix": "error",
|
|
464
|
+
"react-hooks/config": "error",
|
|
465
|
+
"react-hooks/error-boundaries": "error",
|
|
466
|
+
"react-hooks/gating": "error",
|
|
467
|
+
"react-hooks/globals": "error",
|
|
468
|
+
"react-hooks/immutability": "error",
|
|
469
|
+
"react-hooks/incompatible-library": "warn",
|
|
470
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
471
|
+
"react-hooks/purity": "error",
|
|
472
|
+
"react-hooks/refs": "error",
|
|
473
|
+
"react-hooks/set-state-in-effect": "error",
|
|
474
|
+
"react-hooks/set-state-in-render": "error",
|
|
475
|
+
"react-hooks/static-components": "error",
|
|
476
|
+
"react-hooks/unsupported-syntax": "warn",
|
|
477
|
+
"react-hooks/use-memo": "error",
|
|
478
|
+
"react-hooks/void-use-memo": "error",
|
|
470
479
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
471
480
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
472
481
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
473
|
-
"react-you-might-not-need-an-effect/no-empty-effect": "error",
|
|
474
482
|
"react-you-might-not-need-an-effect/no-event-handler": "error",
|
|
483
|
+
"react-you-might-not-need-an-effect/no-external-store-subscription": "error",
|
|
475
484
|
"react-you-might-not-need-an-effect/no-initialize-state": "error",
|
|
476
485
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
477
486
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
478
487
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
479
|
-
"react/component-hook-factories": "error",
|
|
480
488
|
"react/context-name": "warn",
|
|
481
|
-
"react/destructuring-assignment": "warn",
|
|
482
|
-
"react/error-boundaries": "error",
|
|
483
|
-
"react/exhaustive-deps": "warn",
|
|
484
489
|
"react/function-definition": "error",
|
|
485
490
|
"react/id-name": "warn",
|
|
486
491
|
"react/jsx-key-before-spread": "error",
|
|
487
492
|
"react/jsx-no-children-prop-with-children": "error",
|
|
493
|
+
"react/jsx-no-leaked-dollar": "warn",
|
|
488
494
|
"react/jsx-no-leaked-render": "error",
|
|
489
495
|
"react/jsx-no-leaked-semicolon": "warn",
|
|
490
496
|
"react/no-access-state-in-setstate": "error",
|
|
@@ -499,39 +505,29 @@ export default [
|
|
|
499
505
|
"react/no-component-will-update": "error",
|
|
500
506
|
"react/no-context-provider": "warn",
|
|
501
507
|
"react/no-create-ref": "error",
|
|
502
|
-
"react/no-did-update-set-state": "warn",
|
|
503
508
|
"react/no-duplicate-key": "error",
|
|
504
509
|
"react/no-flush-sync": "error",
|
|
505
510
|
"react/no-hydrate": "error",
|
|
506
511
|
"react/no-implicit-key": "error",
|
|
507
512
|
"react/no-leaked-event-listener": "warn",
|
|
513
|
+
"react/no-leaked-fetch": "warn",
|
|
514
|
+
"react/no-leaked-intersection-observer": "warn",
|
|
508
515
|
"react/no-leaked-interval": "warn",
|
|
509
516
|
"react/no-leaked-resize-observer": "warn",
|
|
510
517
|
"react/no-leaked-timeout": "warn",
|
|
511
518
|
"react/no-misused-capture-owner-stack": "error",
|
|
512
519
|
"react/no-nested-lazy-component-declarations": "error",
|
|
513
|
-
"react/no-object-type-as-default-prop": "warn",
|
|
514
520
|
"react/no-render": "error",
|
|
515
|
-
"react/no-unnecessary-use-callback": "warn",
|
|
516
|
-
"react/no-unnecessary-use-memo": "warn",
|
|
517
521
|
"react/no-unnecessary-use-prefix": "warn",
|
|
518
522
|
"react/no-unsafe-component-will-mount": "warn",
|
|
519
523
|
"react/no-unsafe-component-will-receive-props": "warn",
|
|
520
524
|
"react/no-unsafe-component-will-update": "warn",
|
|
521
525
|
"react/no-unsafe-iframe-sandbox": "warn",
|
|
522
|
-
"react/no-unstable-nested-components": "error",
|
|
523
526
|
"react/no-unused-class-component-members": "warn",
|
|
524
527
|
"react/no-unused-props": "warn",
|
|
525
|
-
"react/no-unused-state": "warn",
|
|
526
528
|
"react/no-use-context": "warn",
|
|
527
529
|
"react/no-use-form-state": "error",
|
|
528
|
-
"react/purity": "warn",
|
|
529
530
|
"react/ref-name": "warn",
|
|
530
|
-
"react/rules-of-hooks": "error",
|
|
531
|
-
"react/set-state-in-effect": "warn",
|
|
532
|
-
"react/set-state-in-render": "error",
|
|
533
|
-
"react/unsupported-syntax": "error",
|
|
534
|
-
"react/use-memo": "error",
|
|
535
531
|
"regexp/confusing-quantifier": "warn",
|
|
536
532
|
"regexp/control-character-escape": "error",
|
|
537
533
|
"regexp/match-any": "error",
|
|
@@ -637,12 +633,6 @@ export default [
|
|
|
637
633
|
"sonarjs/reduce-initial-value": "error",
|
|
638
634
|
"symbol-description": "error",
|
|
639
635
|
"unicorn/no-for-loop": "warn",
|
|
640
|
-
"unicorn/prefer-export-from": [
|
|
641
|
-
"error",
|
|
642
|
-
{
|
|
643
|
-
"ignoreUsedVariables": true
|
|
644
|
-
}
|
|
645
|
-
],
|
|
646
636
|
"unused-imports/no-unused-imports": "error",
|
|
647
637
|
"yoda": "error"
|
|
648
638
|
},
|
|
@@ -657,7 +647,6 @@ export default [
|
|
|
657
647
|
"@typescript-eslint/consistent-return": "off",
|
|
658
648
|
"@typescript-eslint/consistent-type-exports": "off",
|
|
659
649
|
"@typescript-eslint/dot-notation": "off",
|
|
660
|
-
"@typescript-eslint/method-signature-style": "off",
|
|
661
650
|
"@typescript-eslint/naming-convention": "off",
|
|
662
651
|
"@typescript-eslint/no-array-delete": "off",
|
|
663
652
|
"@typescript-eslint/no-base-to-string": "off",
|
|
@@ -716,7 +705,6 @@ export default [
|
|
|
716
705
|
"@typescript-eslint/unbound-method": "off",
|
|
717
706
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
718
707
|
"dot-notation": "off",
|
|
719
|
-
"getter-return": "error",
|
|
720
708
|
"no-array-constructor": "off",
|
|
721
709
|
"no-dupe-args": "error",
|
|
722
710
|
"no-empty-function": "off",
|
|
@@ -727,7 +715,6 @@ export default [
|
|
|
727
715
|
"no-shadow": "off",
|
|
728
716
|
"no-throw-literal": "off",
|
|
729
717
|
"no-undef": "error",
|
|
730
|
-
"no-unreachable": "error",
|
|
731
718
|
"no-useless-constructor": "off",
|
|
732
719
|
"prefer-const": [
|
|
733
720
|
"error",
|
|
@@ -961,7 +948,6 @@ export default [
|
|
|
961
948
|
"@typescript-eslint/await-thenable": "off",
|
|
962
949
|
"@typescript-eslint/consistent-type-exports": "off",
|
|
963
950
|
"@typescript-eslint/dot-notation": "off",
|
|
964
|
-
"@typescript-eslint/method-signature-style": "off",
|
|
965
951
|
"@typescript-eslint/no-array-delete": "off",
|
|
966
952
|
"@typescript-eslint/no-base-to-string": "off",
|
|
967
953
|
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
@@ -1040,13 +1026,14 @@ export default [
|
|
|
1040
1026
|
},
|
|
1041
1027
|
|
|
1042
1028
|
// OxLint integration — disables rules already covered by OxLint
|
|
1043
|
-
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint"
|
|
1044
|
-
...[oxlintPlugin.configs["flat/react"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-react"
|
|
1045
|
-
...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-jsx-a11y"
|
|
1046
|
-
...[oxlintPlugin.configs["flat/
|
|
1047
|
-
...[oxlintPlugin.configs["flat/
|
|
1048
|
-
...[oxlintPlugin.configs["flat/
|
|
1049
|
-
...[oxlintPlugin.configs["flat/
|
|
1050
|
-
...[oxlintPlugin.configs["flat/
|
|
1029
|
+
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1030
|
+
...[oxlintPlugin.configs["flat/react"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1031
|
+
...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsx-a11y" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1032
|
+
...[oxlintPlugin.configs["flat/react-hooks"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react-hooks" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1033
|
+
...[oxlintPlugin.configs["flat/node"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-node" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1034
|
+
...[oxlintPlugin.configs["flat/typescript"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-typescript" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1035
|
+
...[oxlintPlugin.configs["flat/unicorn"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-unicorn" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1036
|
+
...[oxlintPlugin.configs["flat/import"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-import" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1037
|
+
...[oxlintPlugin.configs["flat/jsdoc"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsdoc" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1051
1038
|
|
|
1052
1039
|
]
|
package/dist/configs/4eb62e57.js
CHANGED
|
@@ -130,10 +130,6 @@ export default [
|
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
132
|
],
|
|
133
|
-
"@typescript-eslint/method-signature-style": [
|
|
134
|
-
"error",
|
|
135
|
-
"property"
|
|
136
|
-
],
|
|
137
133
|
"@typescript-eslint/naming-convention": [
|
|
138
134
|
"error",
|
|
139
135
|
{
|
|
@@ -373,7 +369,6 @@ export default [
|
|
|
373
369
|
"getBeforeSet"
|
|
374
370
|
],
|
|
375
371
|
"guard-for-in": "error",
|
|
376
|
-
"import/newline-after-import": "error",
|
|
377
372
|
"import/no-extraneous-dependencies": [
|
|
378
373
|
"error",
|
|
379
374
|
{
|
|
@@ -395,9 +390,7 @@ export default [
|
|
|
395
390
|
"jsdoc/reject-function-type": "error",
|
|
396
391
|
"jsdoc/require-next-type": "error",
|
|
397
392
|
"jsdoc/require-returns-check": "error",
|
|
398
|
-
"jsdoc/require-throws-type": "error",
|
|
399
393
|
"jsdoc/require-yields-check": "error",
|
|
400
|
-
"jsdoc/require-yields-type": "error",
|
|
401
394
|
"jsdoc/ts-no-empty-object-type": "error",
|
|
402
395
|
"jsdoc/valid-types": "error",
|
|
403
396
|
"logical-assignment-operators": [
|
|
@@ -715,13 +708,8 @@ export default [
|
|
|
715
708
|
"sonarjs/reduce-initial-value": "error",
|
|
716
709
|
"symbol-description": "error",
|
|
717
710
|
"unicorn/no-array-push-push": "error",
|
|
711
|
+
"unicorn/no-for-each": "error",
|
|
718
712
|
"unicorn/no-for-loop": "error",
|
|
719
|
-
"unicorn/prefer-export-from": [
|
|
720
|
-
"error",
|
|
721
|
-
{
|
|
722
|
-
"ignoreUsedVariables": true
|
|
723
|
-
}
|
|
724
|
-
],
|
|
725
713
|
"unicorn/prefer-switch": [
|
|
726
714
|
"error",
|
|
727
715
|
{
|
|
@@ -744,7 +732,6 @@ export default [
|
|
|
744
732
|
"@typescript-eslint/consistent-type-exports": "off",
|
|
745
733
|
"@typescript-eslint/dot-notation": "off",
|
|
746
734
|
"@typescript-eslint/member-ordering": "off",
|
|
747
|
-
"@typescript-eslint/method-signature-style": "off",
|
|
748
735
|
"@typescript-eslint/naming-convention": "off",
|
|
749
736
|
"@typescript-eslint/no-array-delete": "off",
|
|
750
737
|
"@typescript-eslint/no-base-to-string": "off",
|
|
@@ -803,7 +790,6 @@ export default [
|
|
|
803
790
|
"@typescript-eslint/unbound-method": "off",
|
|
804
791
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
805
792
|
"dot-notation": "off",
|
|
806
|
-
"getter-return": "error",
|
|
807
793
|
"no-array-constructor": "off",
|
|
808
794
|
"no-dupe-args": "error",
|
|
809
795
|
"no-empty-function": "off",
|
|
@@ -814,7 +800,6 @@ export default [
|
|
|
814
800
|
"no-shadow": "off",
|
|
815
801
|
"no-throw-literal": "off",
|
|
816
802
|
"no-undef": "error",
|
|
817
|
-
"no-unreachable": "error",
|
|
818
803
|
"no-useless-constructor": "off",
|
|
819
804
|
"prefer-const": [
|
|
820
805
|
"error",
|
|
@@ -1064,7 +1049,6 @@ export default [
|
|
|
1064
1049
|
"@typescript-eslint/consistent-type-exports": "off",
|
|
1065
1050
|
"@typescript-eslint/dot-notation": "off",
|
|
1066
1051
|
"@typescript-eslint/member-ordering": "off",
|
|
1067
|
-
"@typescript-eslint/method-signature-style": "off",
|
|
1068
1052
|
"@typescript-eslint/naming-convention": "off",
|
|
1069
1053
|
"@typescript-eslint/no-array-delete": "off",
|
|
1070
1054
|
"@typescript-eslint/no-base-to-string": "off",
|
|
@@ -1145,11 +1129,11 @@ export default [
|
|
|
1145
1129
|
},
|
|
1146
1130
|
|
|
1147
1131
|
// OxLint integration — disables rules already covered by OxLint
|
|
1148
|
-
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint"
|
|
1149
|
-
...[oxlintPlugin.configs["flat/node"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-node"
|
|
1150
|
-
...[oxlintPlugin.configs["flat/typescript"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-typescript"
|
|
1151
|
-
...[oxlintPlugin.configs["flat/unicorn"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-unicorn"
|
|
1152
|
-
...[oxlintPlugin.configs["flat/import"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-import"
|
|
1153
|
-
...[oxlintPlugin.configs["flat/jsdoc"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-jsdoc"
|
|
1132
|
+
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1133
|
+
...[oxlintPlugin.configs["flat/node"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-node" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1134
|
+
...[oxlintPlugin.configs["flat/typescript"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-typescript" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1135
|
+
...[oxlintPlugin.configs["flat/unicorn"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-unicorn" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1136
|
+
...[oxlintPlugin.configs["flat/import"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-import" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1137
|
+
...[oxlintPlugin.configs["flat/jsdoc"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsdoc" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1154
1138
|
|
|
1155
1139
|
]
|
package/dist/configs/52762a42.js
CHANGED
|
@@ -899,7 +899,10 @@ export default [
|
|
|
899
899
|
"camelCase": true,
|
|
900
900
|
"pascalCase": true,
|
|
901
901
|
"kebabCase": true
|
|
902
|
-
}
|
|
902
|
+
},
|
|
903
|
+
"ignore": [
|
|
904
|
+
"__tests__"
|
|
905
|
+
]
|
|
903
906
|
}
|
|
904
907
|
],
|
|
905
908
|
"unicorn/new-for-builtins": "error",
|
|
@@ -907,12 +910,12 @@ export default [
|
|
|
907
910
|
"unicorn/no-accessor-recursion": "error",
|
|
908
911
|
"unicorn/no-anonymous-default-export": "error",
|
|
909
912
|
"unicorn/no-array-callback-reference": "error",
|
|
910
|
-
"unicorn/no-array-for-each": "error",
|
|
911
913
|
"unicorn/no-array-method-this-argument": "error",
|
|
912
914
|
"unicorn/no-array-push-push": "error",
|
|
913
915
|
"unicorn/no-array-reduce": "error",
|
|
914
916
|
"unicorn/no-await-expression-member": "error",
|
|
915
917
|
"unicorn/no-await-in-promise-methods": "error",
|
|
918
|
+
"unicorn/no-for-each": "error",
|
|
916
919
|
"unicorn/no-for-loop": "error",
|
|
917
920
|
"unicorn/no-instanceof-builtins": "error",
|
|
918
921
|
"unicorn/no-invalid-fetch-options": "error",
|
|
@@ -952,7 +955,7 @@ export default [
|
|
|
952
955
|
"unicorn/prefer-export-from": [
|
|
953
956
|
"error",
|
|
954
957
|
{
|
|
955
|
-
"
|
|
958
|
+
"checkUsedVariables": false
|
|
956
959
|
}
|
|
957
960
|
],
|
|
958
961
|
"unicorn/prefer-global-this": "error",
|
package/dist/configs/532f50a4.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
|
"jsx-a11y": jsxA11yPlugin,
|
|
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,
|
|
@@ -641,6 +642,23 @@ export default [
|
|
|
641
642
|
"prefer-template": "warn",
|
|
642
643
|
"preserve-caught-error": "error",
|
|
643
644
|
"radix": "error",
|
|
645
|
+
"react-hooks/config": "error",
|
|
646
|
+
"react-hooks/error-boundaries": "error",
|
|
647
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
648
|
+
"react-hooks/gating": "error",
|
|
649
|
+
"react-hooks/globals": "error",
|
|
650
|
+
"react-hooks/immutability": "error",
|
|
651
|
+
"react-hooks/incompatible-library": "warn",
|
|
652
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
653
|
+
"react-hooks/purity": "error",
|
|
654
|
+
"react-hooks/refs": "error",
|
|
655
|
+
"react-hooks/rules-of-hooks": "error",
|
|
656
|
+
"react-hooks/set-state-in-effect": "error",
|
|
657
|
+
"react-hooks/set-state-in-render": "error",
|
|
658
|
+
"react-hooks/static-components": "error",
|
|
659
|
+
"react-hooks/unsupported-syntax": "warn",
|
|
660
|
+
"react-hooks/use-memo": "error",
|
|
661
|
+
"react-hooks/void-use-memo": "error",
|
|
644
662
|
"react-refresh/only-export-components": [
|
|
645
663
|
"warn",
|
|
646
664
|
{
|
|
@@ -650,18 +668,14 @@ export default [
|
|
|
650
668
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
651
669
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
652
670
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
653
|
-
"react-you-might-not-need-an-effect/no-empty-effect": "error",
|
|
654
671
|
"react-you-might-not-need-an-effect/no-event-handler": "error",
|
|
672
|
+
"react-you-might-not-need-an-effect/no-external-store-subscription": "error",
|
|
655
673
|
"react-you-might-not-need-an-effect/no-initialize-state": "error",
|
|
656
674
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
657
675
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
658
676
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
659
677
|
"react/button-has-type": "warn",
|
|
660
|
-
"react/component-hook-factories": "error",
|
|
661
678
|
"react/context-name": "warn",
|
|
662
|
-
"react/destructuring-assignment": "warn",
|
|
663
|
-
"react/error-boundaries": "error",
|
|
664
|
-
"react/exhaustive-deps": "warn",
|
|
665
679
|
"react/forward-ref-uses-ref": "warn",
|
|
666
680
|
"react/function-definition": "error",
|
|
667
681
|
"react/hook-use-state": "warn",
|
|
@@ -672,6 +686,7 @@ export default [
|
|
|
672
686
|
"react/jsx-no-children-prop-with-children": "error",
|
|
673
687
|
"react/jsx-no-comment-textnodes": "warn",
|
|
674
688
|
"react/jsx-no-constructed-context-values": "warn",
|
|
689
|
+
"react/jsx-no-leaked-dollar": "warn",
|
|
675
690
|
"react/jsx-no-leaked-render": "error",
|
|
676
691
|
"react/jsx-no-leaked-semicolon": "warn",
|
|
677
692
|
"react/jsx-no-script-url": "warn",
|
|
@@ -703,6 +718,8 @@ export default [
|
|
|
703
718
|
"react/no-hydrate": "error",
|
|
704
719
|
"react/no-implicit-key": "error",
|
|
705
720
|
"react/no-leaked-event-listener": "warn",
|
|
721
|
+
"react/no-leaked-fetch": "warn",
|
|
722
|
+
"react/no-leaked-intersection-observer": "warn",
|
|
706
723
|
"react/no-leaked-interval": "warn",
|
|
707
724
|
"react/no-leaked-resize-observer": "warn",
|
|
708
725
|
"react/no-leaked-timeout": "warn",
|
|
@@ -710,12 +727,9 @@ export default [
|
|
|
710
727
|
"react/no-namespace": "error",
|
|
711
728
|
"react/no-nested-lazy-component-declarations": "error",
|
|
712
729
|
"react/no-object-type-as-default-prop": "warn",
|
|
713
|
-
"react/no-redundant-should-component-update": "error",
|
|
714
730
|
"react/no-render": "error",
|
|
715
731
|
"react/no-render-return-value": "error",
|
|
716
732
|
"react/no-unknown-property": "error",
|
|
717
|
-
"react/no-unnecessary-use-callback": "warn",
|
|
718
|
-
"react/no-unnecessary-use-memo": "warn",
|
|
719
733
|
"react/no-unnecessary-use-prefix": "warn",
|
|
720
734
|
"react/no-unsafe-component-will-mount": "warn",
|
|
721
735
|
"react/no-unsafe-component-will-receive-props": "warn",
|
|
@@ -724,18 +738,11 @@ export default [
|
|
|
724
738
|
"react/no-unstable-nested-components": "error",
|
|
725
739
|
"react/no-unused-class-component-members": "warn",
|
|
726
740
|
"react/no-unused-props": "warn",
|
|
727
|
-
"react/no-unused-state": "warn",
|
|
728
741
|
"react/no-use-context": "warn",
|
|
729
742
|
"react/no-use-form-state": "error",
|
|
730
743
|
"react/no-will-update-set-state": "warn",
|
|
731
|
-
"react/purity": "warn",
|
|
732
744
|
"react/ref-name": "warn",
|
|
733
|
-
"react/rules-of-hooks": "error",
|
|
734
|
-
"react/set-state-in-effect": "warn",
|
|
735
|
-
"react/set-state-in-render": "error",
|
|
736
745
|
"react/style-prop-object": "error",
|
|
737
|
-
"react/unsupported-syntax": "error",
|
|
738
|
-
"react/use-memo": "error",
|
|
739
746
|
"react/void-dom-elements-no-children": "error",
|
|
740
747
|
"regexp/confusing-quantifier": "warn",
|
|
741
748
|
"regexp/control-character-escape": "error",
|
|
@@ -860,7 +867,10 @@ export default [
|
|
|
860
867
|
"camelCase": true,
|
|
861
868
|
"pascalCase": true,
|
|
862
869
|
"kebabCase": true
|
|
863
|
-
}
|
|
870
|
+
},
|
|
871
|
+
"ignore": [
|
|
872
|
+
"__tests__"
|
|
873
|
+
]
|
|
864
874
|
}
|
|
865
875
|
],
|
|
866
876
|
"unicorn/new-for-builtins": "error",
|
|
@@ -909,7 +919,7 @@ export default [
|
|
|
909
919
|
"unicorn/prefer-export-from": [
|
|
910
920
|
"error",
|
|
911
921
|
{
|
|
912
|
-
"
|
|
922
|
+
"checkUsedVariables": false
|
|
913
923
|
}
|
|
914
924
|
],
|
|
915
925
|
"unicorn/prefer-global-this": "error",
|