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/d537b683.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
|
"node": nodePlugin,
|
|
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,
|
|
@@ -929,6 +932,27 @@ export default [
|
|
|
929
932
|
"prefer-template": "error",
|
|
930
933
|
"preserve-caught-error": "error",
|
|
931
934
|
"radix": "error",
|
|
935
|
+
"react-hooks/config": "error",
|
|
936
|
+
"react-hooks/error-boundaries": "error",
|
|
937
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
938
|
+
"react-hooks/gating": "error",
|
|
939
|
+
"react-hooks/globals": "error",
|
|
940
|
+
"react-hooks/immutability": "error",
|
|
941
|
+
"react-hooks/incompatible-library": "warn",
|
|
942
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
943
|
+
"react-hooks/purity": "error",
|
|
944
|
+
"react-hooks/refs": "error",
|
|
945
|
+
"react-hooks/rules-of-hooks": "error",
|
|
946
|
+
"react-hooks/set-state-in-effect": "error",
|
|
947
|
+
"react-hooks/set-state-in-render": "error",
|
|
948
|
+
"react-hooks/static-components": "error",
|
|
949
|
+
"react-hooks/unsupported-syntax": "warn",
|
|
950
|
+
"react-hooks/use-memo": "error",
|
|
951
|
+
"react-hooks/void-use-memo": "error",
|
|
952
|
+
"react-perf/jsx-no-jsx-as-prop": "error",
|
|
953
|
+
"react-perf/jsx-no-new-array-as-prop": "error",
|
|
954
|
+
"react-perf/jsx-no-new-function-as-prop": "error",
|
|
955
|
+
"react-perf/jsx-no-new-object-as-prop": "error",
|
|
932
956
|
"react-refresh/only-export-components": [
|
|
933
957
|
"warn",
|
|
934
958
|
{
|
|
@@ -938,18 +962,14 @@ export default [
|
|
|
938
962
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
939
963
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
940
964
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
941
|
-
"react-you-might-not-need-an-effect/no-empty-effect": "error",
|
|
942
965
|
"react-you-might-not-need-an-effect/no-event-handler": "error",
|
|
966
|
+
"react-you-might-not-need-an-effect/no-external-store-subscription": "error",
|
|
943
967
|
"react-you-might-not-need-an-effect/no-initialize-state": "error",
|
|
944
968
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
945
969
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
946
970
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
947
971
|
"react/button-has-type": "error",
|
|
948
|
-
"react/component-hook-factories": "error",
|
|
949
972
|
"react/context-name": "warn",
|
|
950
|
-
"react/destructuring-assignment": "warn",
|
|
951
|
-
"react/error-boundaries": "error",
|
|
952
|
-
"react/exhaustive-deps": "warn",
|
|
953
973
|
"react/forward-ref-uses-ref": "error",
|
|
954
974
|
"react/function-definition": "error",
|
|
955
975
|
"react/hook-use-state": "warn",
|
|
@@ -960,6 +980,7 @@ export default [
|
|
|
960
980
|
"react/jsx-no-children-prop-with-children": "error",
|
|
961
981
|
"react/jsx-no-comment-textnodes": "error",
|
|
962
982
|
"react/jsx-no-constructed-context-values": "error",
|
|
983
|
+
"react/jsx-no-leaked-dollar": "warn",
|
|
963
984
|
"react/jsx-no-leaked-render": "error",
|
|
964
985
|
"react/jsx-no-leaked-semicolon": "warn",
|
|
965
986
|
"react/jsx-no-script-url": "warn",
|
|
@@ -991,6 +1012,8 @@ export default [
|
|
|
991
1012
|
"react/no-hydrate": "error",
|
|
992
1013
|
"react/no-implicit-key": "error",
|
|
993
1014
|
"react/no-leaked-event-listener": "error",
|
|
1015
|
+
"react/no-leaked-fetch": "warn",
|
|
1016
|
+
"react/no-leaked-intersection-observer": "warn",
|
|
994
1017
|
"react/no-leaked-interval": "error",
|
|
995
1018
|
"react/no-leaked-resize-observer": "error",
|
|
996
1019
|
"react/no-leaked-timeout": "error",
|
|
@@ -998,12 +1021,9 @@ export default [
|
|
|
998
1021
|
"react/no-namespace": "error",
|
|
999
1022
|
"react/no-nested-lazy-component-declarations": "error",
|
|
1000
1023
|
"react/no-object-type-as-default-prop": "error",
|
|
1001
|
-
"react/no-redundant-should-component-update": "error",
|
|
1002
1024
|
"react/no-render": "error",
|
|
1003
1025
|
"react/no-render-return-value": "error",
|
|
1004
1026
|
"react/no-unknown-property": "error",
|
|
1005
|
-
"react/no-unnecessary-use-callback": "warn",
|
|
1006
|
-
"react/no-unnecessary-use-memo": "warn",
|
|
1007
1027
|
"react/no-unnecessary-use-prefix": "warn",
|
|
1008
1028
|
"react/no-unsafe-component-will-mount": "warn",
|
|
1009
1029
|
"react/no-unsafe-component-will-receive-props": "warn",
|
|
@@ -1016,14 +1036,8 @@ export default [
|
|
|
1016
1036
|
"react/no-use-context": "error",
|
|
1017
1037
|
"react/no-use-form-state": "error",
|
|
1018
1038
|
"react/no-will-update-set-state": "warn",
|
|
1019
|
-
"react/purity": "warn",
|
|
1020
1039
|
"react/ref-name": "warn",
|
|
1021
|
-
"react/rules-of-hooks": "error",
|
|
1022
|
-
"react/set-state-in-effect": "warn",
|
|
1023
|
-
"react/set-state-in-render": "error",
|
|
1024
1040
|
"react/style-prop-object": "error",
|
|
1025
|
-
"react/unsupported-syntax": "error",
|
|
1026
|
-
"react/use-memo": "error",
|
|
1027
1041
|
"react/void-dom-elements-no-children": "error",
|
|
1028
1042
|
"regexp/confusing-quantifier": "warn",
|
|
1029
1043
|
"regexp/control-character-escape": "error",
|
|
@@ -1173,7 +1187,10 @@ export default [
|
|
|
1173
1187
|
"camelCase": true,
|
|
1174
1188
|
"pascalCase": true,
|
|
1175
1189
|
"kebabCase": true
|
|
1176
|
-
}
|
|
1190
|
+
},
|
|
1191
|
+
"ignore": [
|
|
1192
|
+
"__tests__"
|
|
1193
|
+
]
|
|
1177
1194
|
}
|
|
1178
1195
|
],
|
|
1179
1196
|
"unicorn/new-for-builtins": "error",
|
|
@@ -1181,12 +1198,12 @@ export default [
|
|
|
1181
1198
|
"unicorn/no-accessor-recursion": "error",
|
|
1182
1199
|
"unicorn/no-anonymous-default-export": "error",
|
|
1183
1200
|
"unicorn/no-array-callback-reference": "error",
|
|
1184
|
-
"unicorn/no-array-for-each": "error",
|
|
1185
1201
|
"unicorn/no-array-method-this-argument": "error",
|
|
1186
1202
|
"unicorn/no-array-push-push": "error",
|
|
1187
1203
|
"unicorn/no-array-reduce": "error",
|
|
1188
1204
|
"unicorn/no-await-expression-member": "error",
|
|
1189
1205
|
"unicorn/no-await-in-promise-methods": "error",
|
|
1206
|
+
"unicorn/no-for-each": "error",
|
|
1190
1207
|
"unicorn/no-for-loop": "error",
|
|
1191
1208
|
"unicorn/no-instanceof-builtins": "error",
|
|
1192
1209
|
"unicorn/no-invalid-fetch-options": "error",
|
|
@@ -1226,7 +1243,7 @@ export default [
|
|
|
1226
1243
|
"unicorn/prefer-export-from": [
|
|
1227
1244
|
"error",
|
|
1228
1245
|
{
|
|
1229
|
-
"
|
|
1246
|
+
"checkUsedVariables": false
|
|
1230
1247
|
}
|
|
1231
1248
|
],
|
|
1232
1249
|
"unicorn/prefer-global-this": "error",
|
package/dist/configs/db69ebb6.js
CHANGED
|
@@ -8,13 +8,13 @@ import globals from "globals"
|
|
|
8
8
|
import importXPlugin from "eslint-plugin-import-x"
|
|
9
9
|
import jsdocPlugin from "eslint-plugin-jsdoc"
|
|
10
10
|
import jsonPlugin from "@eslint/json"
|
|
11
|
-
import jsxA11yPlugin from "eslint-plugin-jsx-a11y"
|
|
12
11
|
import nodePlugin from "eslint-plugin-n"
|
|
13
12
|
import oxlintPlugin from "eslint-plugin-oxlint"
|
|
14
13
|
import packageJsonPlugin from "eslint-plugin-package-json"
|
|
15
14
|
import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
16
15
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
17
16
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
17
|
+
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
18
18
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
19
19
|
import securityPlugin from "eslint-plugin-security"
|
|
20
20
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
@@ -26,7 +26,7 @@ import unicornPlugin from "eslint-plugin-unicorn"
|
|
|
26
26
|
import unusedImportsPlugin from "eslint-plugin-unused-imports"
|
|
27
27
|
import vitestPlugin from "@vitest/eslint-plugin"
|
|
28
28
|
|
|
29
|
-
// React compat plugin —
|
|
29
|
+
// React compat plugin — maps @eslint-react rule families into the `react/` namespace
|
|
30
30
|
// and aliases rules to legacy eslint-plugin-react names for OxLint compatibility.
|
|
31
31
|
const reactCompatPlugin = (() => {
|
|
32
32
|
const core = eslintReactPlugin.rules
|
|
@@ -52,7 +52,6 @@ const reactCompatPlugin = (() => {
|
|
|
52
52
|
"no-unstable-nested-components": [core, "no-nested-component-definitions"],
|
|
53
53
|
"display-name": [core, "no-missing-component-display-name"],
|
|
54
54
|
"forward-ref-uses-ref": [core, "no-forward-ref"],
|
|
55
|
-
"destructuring-assignment": [core, "prefer-destructuring-assignment"],
|
|
56
55
|
"no-did-mount-set-state": [core, "no-set-state-in-component-did-mount"],
|
|
57
56
|
"no-did-update-set-state": [core, "no-set-state-in-component-did-update"],
|
|
58
57
|
"no-will-update-set-state": [core, "no-set-state-in-component-will-update"],
|
|
@@ -74,7 +73,7 @@ const reactCompatPlugin = (() => {
|
|
|
74
73
|
// Identical-name aliases (core rules where legacy name = @eslint-react name)
|
|
75
74
|
const identicalCore = [
|
|
76
75
|
"no-access-state-in-setstate", "no-array-index-key",
|
|
77
|
-
"no-direct-mutation-state",
|
|
76
|
+
"no-direct-mutation-state",
|
|
78
77
|
"no-unused-class-component-members", "no-unused-state",
|
|
79
78
|
]
|
|
80
79
|
for (const n of identicalCore) aliases[n] = [core, n]
|
|
@@ -127,10 +126,10 @@ export default [
|
|
|
127
126
|
"de-morgan": deMorganPlugin,
|
|
128
127
|
"import": importXPlugin,
|
|
129
128
|
"jsdoc": jsdocPlugin,
|
|
130
|
-
"jsx-a11y": jsxA11yPlugin,
|
|
131
129
|
"node": nodePlugin,
|
|
132
130
|
"perfectionist": perfectionistPlugin,
|
|
133
131
|
"react": reactCompatPlugin,
|
|
132
|
+
"react-hooks": reactHooksPlugin,
|
|
134
133
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
135
134
|
"regexp": regexpPlugin,
|
|
136
135
|
"security": securityPlugin,
|
|
@@ -234,10 +233,6 @@ export default [
|
|
|
234
233
|
]
|
|
235
234
|
}
|
|
236
235
|
],
|
|
237
|
-
"@typescript-eslint/method-signature-style": [
|
|
238
|
-
"error",
|
|
239
|
-
"property"
|
|
240
|
-
],
|
|
241
236
|
"@typescript-eslint/naming-convention": [
|
|
242
237
|
"error",
|
|
243
238
|
{
|
|
@@ -484,7 +479,6 @@ export default [
|
|
|
484
479
|
"getBeforeSet"
|
|
485
480
|
],
|
|
486
481
|
"guard-for-in": "error",
|
|
487
|
-
"import/newline-after-import": "error",
|
|
488
482
|
"import/no-extraneous-dependencies": [
|
|
489
483
|
"error",
|
|
490
484
|
{
|
|
@@ -506,13 +500,9 @@ export default [
|
|
|
506
500
|
"jsdoc/reject-function-type": "error",
|
|
507
501
|
"jsdoc/require-next-type": "error",
|
|
508
502
|
"jsdoc/require-returns-check": "error",
|
|
509
|
-
"jsdoc/require-throws-type": "error",
|
|
510
503
|
"jsdoc/require-yields-check": "error",
|
|
511
|
-
"jsdoc/require-yields-type": "error",
|
|
512
504
|
"jsdoc/ts-no-empty-object-type": "error",
|
|
513
505
|
"jsdoc/valid-types": "error",
|
|
514
|
-
"jsx-a11y/interactive-supports-focus": "error",
|
|
515
|
-
"jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
516
506
|
"logical-assignment-operators": [
|
|
517
507
|
"error",
|
|
518
508
|
"always",
|
|
@@ -700,24 +690,36 @@ export default [
|
|
|
700
690
|
"prefer-template": "error",
|
|
701
691
|
"preserve-caught-error": "error",
|
|
702
692
|
"radix": "error",
|
|
693
|
+
"react-hooks/config": "error",
|
|
694
|
+
"react-hooks/error-boundaries": "error",
|
|
695
|
+
"react-hooks/gating": "error",
|
|
696
|
+
"react-hooks/globals": "error",
|
|
697
|
+
"react-hooks/immutability": "error",
|
|
698
|
+
"react-hooks/incompatible-library": "warn",
|
|
699
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
700
|
+
"react-hooks/purity": "error",
|
|
701
|
+
"react-hooks/refs": "error",
|
|
702
|
+
"react-hooks/set-state-in-effect": "error",
|
|
703
|
+
"react-hooks/set-state-in-render": "error",
|
|
704
|
+
"react-hooks/static-components": "error",
|
|
705
|
+
"react-hooks/unsupported-syntax": "warn",
|
|
706
|
+
"react-hooks/use-memo": "error",
|
|
707
|
+
"react-hooks/void-use-memo": "error",
|
|
703
708
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
704
709
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
705
710
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
706
|
-
"react-you-might-not-need-an-effect/no-empty-effect": "error",
|
|
707
711
|
"react-you-might-not-need-an-effect/no-event-handler": "error",
|
|
712
|
+
"react-you-might-not-need-an-effect/no-external-store-subscription": "error",
|
|
708
713
|
"react-you-might-not-need-an-effect/no-initialize-state": "error",
|
|
709
714
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
710
715
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
711
716
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
712
|
-
"react/component-hook-factories": "error",
|
|
713
717
|
"react/context-name": "warn",
|
|
714
|
-
"react/destructuring-assignment": "warn",
|
|
715
|
-
"react/error-boundaries": "error",
|
|
716
|
-
"react/exhaustive-deps": "warn",
|
|
717
718
|
"react/function-definition": "error",
|
|
718
719
|
"react/id-name": "warn",
|
|
719
720
|
"react/jsx-key-before-spread": "error",
|
|
720
721
|
"react/jsx-no-children-prop-with-children": "error",
|
|
722
|
+
"react/jsx-no-leaked-dollar": "warn",
|
|
721
723
|
"react/jsx-no-leaked-render": "error",
|
|
722
724
|
"react/jsx-no-leaked-semicolon": "warn",
|
|
723
725
|
"react/no-access-state-in-setstate": "error",
|
|
@@ -732,39 +734,30 @@ export default [
|
|
|
732
734
|
"react/no-component-will-update": "error",
|
|
733
735
|
"react/no-context-provider": "error",
|
|
734
736
|
"react/no-create-ref": "error",
|
|
735
|
-
"react/no-did-update-set-state": "warn",
|
|
736
737
|
"react/no-duplicate-key": "error",
|
|
737
738
|
"react/no-flush-sync": "error",
|
|
738
739
|
"react/no-hydrate": "error",
|
|
739
740
|
"react/no-implicit-key": "error",
|
|
740
741
|
"react/no-leaked-event-listener": "error",
|
|
742
|
+
"react/no-leaked-fetch": "warn",
|
|
743
|
+
"react/no-leaked-intersection-observer": "warn",
|
|
741
744
|
"react/no-leaked-interval": "error",
|
|
742
745
|
"react/no-leaked-resize-observer": "error",
|
|
743
746
|
"react/no-leaked-timeout": "error",
|
|
744
747
|
"react/no-misused-capture-owner-stack": "error",
|
|
745
748
|
"react/no-nested-lazy-component-declarations": "error",
|
|
746
|
-
"react/no-object-type-as-default-prop": "error",
|
|
747
749
|
"react/no-render": "error",
|
|
748
|
-
"react/no-unnecessary-use-callback": "warn",
|
|
749
|
-
"react/no-unnecessary-use-memo": "warn",
|
|
750
750
|
"react/no-unnecessary-use-prefix": "warn",
|
|
751
751
|
"react/no-unsafe-component-will-mount": "warn",
|
|
752
752
|
"react/no-unsafe-component-will-receive-props": "warn",
|
|
753
753
|
"react/no-unsafe-component-will-update": "warn",
|
|
754
754
|
"react/no-unsafe-iframe-sandbox": "warn",
|
|
755
|
-
"react/no-unstable-nested-components": "error",
|
|
756
755
|
"react/no-unused-class-component-members": "warn",
|
|
757
756
|
"react/no-unused-props": "warn",
|
|
758
757
|
"react/no-unused-state": "error",
|
|
759
758
|
"react/no-use-context": "error",
|
|
760
759
|
"react/no-use-form-state": "error",
|
|
761
|
-
"react/purity": "warn",
|
|
762
760
|
"react/ref-name": "warn",
|
|
763
|
-
"react/rules-of-hooks": "error",
|
|
764
|
-
"react/set-state-in-effect": "warn",
|
|
765
|
-
"react/set-state-in-render": "error",
|
|
766
|
-
"react/unsupported-syntax": "error",
|
|
767
|
-
"react/use-memo": "error",
|
|
768
761
|
"regexp/confusing-quantifier": "warn",
|
|
769
762
|
"regexp/control-character-escape": "error",
|
|
770
763
|
"regexp/match-any": "error",
|
|
@@ -893,13 +886,8 @@ export default [
|
|
|
893
886
|
"sonarjs/reduce-initial-value": "error",
|
|
894
887
|
"symbol-description": "error",
|
|
895
888
|
"unicorn/no-array-push-push": "error",
|
|
889
|
+
"unicorn/no-for-each": "error",
|
|
896
890
|
"unicorn/no-for-loop": "error",
|
|
897
|
-
"unicorn/prefer-export-from": [
|
|
898
|
-
"error",
|
|
899
|
-
{
|
|
900
|
-
"ignoreUsedVariables": true
|
|
901
|
-
}
|
|
902
|
-
],
|
|
903
891
|
"unicorn/prefer-switch": [
|
|
904
892
|
"error",
|
|
905
893
|
{
|
|
@@ -922,7 +910,6 @@ export default [
|
|
|
922
910
|
"@typescript-eslint/consistent-type-exports": "off",
|
|
923
911
|
"@typescript-eslint/dot-notation": "off",
|
|
924
912
|
"@typescript-eslint/member-ordering": "off",
|
|
925
|
-
"@typescript-eslint/method-signature-style": "off",
|
|
926
913
|
"@typescript-eslint/naming-convention": "off",
|
|
927
914
|
"@typescript-eslint/no-array-delete": "off",
|
|
928
915
|
"@typescript-eslint/no-base-to-string": "off",
|
|
@@ -981,7 +968,6 @@ export default [
|
|
|
981
968
|
"@typescript-eslint/unbound-method": "off",
|
|
982
969
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
983
970
|
"dot-notation": "off",
|
|
984
|
-
"getter-return": "error",
|
|
985
971
|
"no-array-constructor": "off",
|
|
986
972
|
"no-dupe-args": "error",
|
|
987
973
|
"no-empty-function": "off",
|
|
@@ -992,7 +978,6 @@ export default [
|
|
|
992
978
|
"no-shadow": "off",
|
|
993
979
|
"no-throw-literal": "off",
|
|
994
980
|
"no-undef": "error",
|
|
995
|
-
"no-unreachable": "error",
|
|
996
981
|
"no-useless-constructor": "off",
|
|
997
982
|
"prefer-const": [
|
|
998
983
|
"error",
|
|
@@ -1242,7 +1227,6 @@ export default [
|
|
|
1242
1227
|
"@typescript-eslint/consistent-type-exports": "off",
|
|
1243
1228
|
"@typescript-eslint/dot-notation": "off",
|
|
1244
1229
|
"@typescript-eslint/member-ordering": "off",
|
|
1245
|
-
"@typescript-eslint/method-signature-style": "off",
|
|
1246
1230
|
"@typescript-eslint/naming-convention": "off",
|
|
1247
1231
|
"@typescript-eslint/no-array-delete": "off",
|
|
1248
1232
|
"@typescript-eslint/no-base-to-string": "off",
|
|
@@ -1322,13 +1306,15 @@ export default [
|
|
|
1322
1306
|
},
|
|
1323
1307
|
|
|
1324
1308
|
// OxLint integration — disables rules already covered by OxLint
|
|
1325
|
-
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint"
|
|
1326
|
-
...[oxlintPlugin.configs["flat/react"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-react"
|
|
1327
|
-
...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c) => ({ name: "eslint-config-setup/oxlint-jsx-a11y"
|
|
1328
|
-
...[oxlintPlugin.configs["flat/
|
|
1329
|
-
...[oxlintPlugin.configs["flat/
|
|
1330
|
-
...[oxlintPlugin.configs["flat/
|
|
1331
|
-
...[oxlintPlugin.configs["flat/
|
|
1332
|
-
...[oxlintPlugin.configs["flat/
|
|
1309
|
+
...[oxlintPlugin.configs["flat/recommended"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1310
|
+
...[oxlintPlugin.configs["flat/react"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1311
|
+
...[oxlintPlugin.configs["flat/jsx-a11y"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsx-a11y" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1312
|
+
...[oxlintPlugin.configs["flat/react-hooks"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react-hooks" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1313
|
+
...[oxlintPlugin.configs["flat/react-perf"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-react-perf" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1314
|
+
...[oxlintPlugin.configs["flat/node"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-node" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1315
|
+
...[oxlintPlugin.configs["flat/typescript"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-typescript" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1316
|
+
...[oxlintPlugin.configs["flat/unicorn"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-unicorn" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1317
|
+
...[oxlintPlugin.configs["flat/import"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-import" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1318
|
+
...[oxlintPlugin.configs["flat/jsdoc"]].flat().map((c, index, array) => ({ ...c, name: "eslint-config-setup/oxlint-jsdoc" + (array.length > 1 ? "-" + (index + 1) : "") })),
|
|
1333
1319
|
|
|
1334
1320
|
]
|
package/dist/configs/e4b137fa.js
CHANGED
|
@@ -621,7 +621,10 @@ export default [
|
|
|
621
621
|
"camelCase": true,
|
|
622
622
|
"pascalCase": true,
|
|
623
623
|
"kebabCase": true
|
|
624
|
-
}
|
|
624
|
+
},
|
|
625
|
+
"ignore": [
|
|
626
|
+
"__tests__"
|
|
627
|
+
]
|
|
625
628
|
}
|
|
626
629
|
],
|
|
627
630
|
"unicorn/new-for-builtins": "error",
|
|
@@ -670,7 +673,7 @@ export default [
|
|
|
670
673
|
"unicorn/prefer-export-from": [
|
|
671
674
|
"error",
|
|
672
675
|
{
|
|
673
|
-
"
|
|
676
|
+
"checkUsedVariables": false
|
|
674
677
|
}
|
|
675
678
|
],
|
|
676
679
|
"unicorn/prefer-global-this": "error",
|
package/dist/modules.d.ts
CHANGED
|
@@ -161,16 +161,18 @@ declare function prettierCompatConfig(): FlatConfigArray;
|
|
|
161
161
|
/**
|
|
162
162
|
* React config — React 19+, Hooks, JSX accessibility, and Web API leak detection.
|
|
163
163
|
*
|
|
164
|
-
* Uses `@eslint-react` (eslint-plugin-react-x)
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
164
|
+
* Uses `@eslint-react` (eslint-plugin-react-x) for React, DOM, Web API,
|
|
165
|
+
* naming-convention, and RSC rules under the `react/` compat namespace.
|
|
166
|
+
* Rules of Hooks and React Compiler linting come from Meta's
|
|
167
|
+
* eslint-plugin-react-hooks under the native `react-hooks/` namespace.
|
|
168
168
|
*
|
|
169
|
-
* Base
|
|
170
|
-
*
|
|
171
|
-
*
|
|
169
|
+
* Base React severities come from the `@eslint-react` `strict-type-checked` preset.
|
|
170
|
+
* When `ai: true`, preset "warn" rules that AI should always get right are
|
|
171
|
+
* promoted to "error", and React performance rules are enabled as errors.
|
|
172
172
|
*
|
|
173
173
|
* @see https://eslint-react.xyz/docs/rules/overview
|
|
174
|
+
* @see https://www.npmjs.com/package/eslint-plugin-react-hooks
|
|
175
|
+
* @see https://github.com/cvazac/eslint-plugin-react-perf
|
|
174
176
|
* @see https://github.com/ArnaudBarre/eslint-plugin-react-refresh
|
|
175
177
|
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#supported-rules
|
|
176
178
|
*/
|