eslint-config-setup 0.2.8 → 0.3.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/dist/configs/0b23ff88.js +0 -4
- package/dist/configs/196d687e.js +37 -56
- package/dist/configs/2f6f3a82.js +37 -54
- package/dist/configs/4eb62e57.js +0 -4
- package/dist/configs/52762a42.js +0 -4
- package/dist/configs/532f50a4.js +37 -54
- package/dist/configs/5a302873.js +37 -54
- package/dist/configs/6bc0d588.js +37 -56
- package/dist/configs/91e82988.js +37 -54
- package/dist/configs/c2fecd3d.js +0 -4
- package/dist/configs/d537b683.js +37 -56
- package/dist/configs/db69ebb6.js +37 -56
- package/dist/index.d.ts +2 -2
- package/dist/modules.d.ts +9 -10
- package/dist/modules.js +95 -104
- package/dist/modules.js.map +1 -1
- package/dist/oxlint-configs/78b40daa.json +4 -38
- package/dist/oxlint-configs/7ff0d87e.json +4 -3
- package/dist/oxlint-configs/85912bf0.json +4 -3
- package/dist/oxlint-configs/9dc42dc3.json +4 -38
- package/dist/oxlint-configs/d46cb9b7.json +4 -39
- package/dist/oxlint-configs/ef643c60.json +4 -39
- package/dist/{types-L-A140ji.d.ts → types-D227zLeg.d.ts} +1 -1
- package/package.json +3 -2
package/dist/configs/0b23ff88.js
CHANGED
|
@@ -13,7 +13,6 @@ import oxlintPlugin from "eslint-plugin-oxlint"
|
|
|
13
13
|
import packageJsonPlugin from "eslint-plugin-package-json"
|
|
14
14
|
import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
15
15
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
16
|
-
import reactPlugin from "eslint-plugin-react"
|
|
17
16
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
18
17
|
import securityPlugin from "eslint-plugin-security"
|
|
19
18
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
@@ -41,7 +40,6 @@ export default [
|
|
|
41
40
|
"jsx-a11y": jsxA11yPlugin,
|
|
42
41
|
"node": nodePlugin,
|
|
43
42
|
"perfectionist": perfectionistPlugin,
|
|
44
|
-
"react": reactPlugin,
|
|
45
43
|
"regexp": regexpPlugin,
|
|
46
44
|
"security": securityPlugin,
|
|
47
45
|
"sonarjs": sonarjsPlugin,
|
|
@@ -699,8 +697,6 @@ export default [
|
|
|
699
697
|
"prefer-template": "error",
|
|
700
698
|
"preserve-caught-error": "error",
|
|
701
699
|
"radix": "error",
|
|
702
|
-
"react/jsx-no-bind": "error",
|
|
703
|
-
"react/no-multi-comp": "error",
|
|
704
700
|
"regexp/confusing-quantifier": "warn",
|
|
705
701
|
"regexp/control-character-escape": "error",
|
|
706
702
|
"regexp/match-any": "error",
|
package/dist/configs/196d687e.js
CHANGED
|
@@ -4,6 +4,7 @@ import * as mdxPlugin from "eslint-plugin-mdx"
|
|
|
4
4
|
import compatPlugin from "eslint-plugin-compat"
|
|
5
5
|
import cspellPlugin from "@cspell/eslint-plugin"
|
|
6
6
|
import deMorganPlugin from "eslint-plugin-de-morgan"
|
|
7
|
+
import eslintReactPlugin from "@eslint-react/eslint-plugin"
|
|
7
8
|
import globals from "globals"
|
|
8
9
|
import importXPlugin from "eslint-plugin-import-x"
|
|
9
10
|
import jsdocPlugin from "eslint-plugin-jsdoc"
|
|
@@ -16,12 +17,12 @@ import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
|
16
17
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
17
18
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
18
19
|
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
19
|
-
import reactPlugin from "eslint-plugin-react"
|
|
20
20
|
import reactRefreshPlugin from "eslint-plugin-react-refresh"
|
|
21
21
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
22
22
|
import securityPlugin from "eslint-plugin-security"
|
|
23
23
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
24
24
|
import storybookPlugin from "eslint-plugin-storybook"
|
|
25
|
+
import stylisticPlugin from "@stylistic/eslint-plugin"
|
|
25
26
|
import testingLibraryPlugin from "eslint-plugin-testing-library"
|
|
26
27
|
import tseslint from "typescript-eslint"
|
|
27
28
|
import unicornPlugin from "eslint-plugin-unicorn"
|
|
@@ -37,6 +38,7 @@ export default [
|
|
|
37
38
|
name: "eslint-config-setup/base",
|
|
38
39
|
plugins: {
|
|
39
40
|
"@cspell": cspellPlugin,
|
|
41
|
+
"@stylistic": stylisticPlugin,
|
|
40
42
|
"@typescript-eslint": tseslint.plugin,
|
|
41
43
|
"compat": compatPlugin,
|
|
42
44
|
"de-morgan": deMorganPlugin,
|
|
@@ -45,9 +47,11 @@ export default [
|
|
|
45
47
|
"jsx-a11y": jsxA11yPlugin,
|
|
46
48
|
"node": nodePlugin,
|
|
47
49
|
"perfectionist": perfectionistPlugin,
|
|
48
|
-
"react":
|
|
50
|
+
"react": eslintReactPlugin,
|
|
51
|
+
"react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
|
|
49
52
|
"react-hooks": reactHooksPlugin,
|
|
50
53
|
"react-refresh": reactRefreshPlugin,
|
|
54
|
+
"react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
|
|
51
55
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
52
56
|
"regexp": regexpPlugin,
|
|
53
57
|
"security": securityPlugin,
|
|
@@ -65,9 +69,6 @@ export default [
|
|
|
65
69
|
...globals.browser,
|
|
66
70
|
},
|
|
67
71
|
},
|
|
68
|
-
settings: {
|
|
69
|
-
react: { version: "detect" },
|
|
70
|
-
},
|
|
71
72
|
rules: {
|
|
72
73
|
"@cspell/spellchecker": [
|
|
73
74
|
"warn",
|
|
@@ -78,6 +79,14 @@ export default [
|
|
|
78
79
|
"autoFix": false
|
|
79
80
|
}
|
|
80
81
|
],
|
|
82
|
+
"@stylistic/jsx-curly-brace-presence": [
|
|
83
|
+
"error",
|
|
84
|
+
{
|
|
85
|
+
"props": "never",
|
|
86
|
+
"children": "never"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"@stylistic/jsx-self-closing-comp": "error",
|
|
81
90
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
82
91
|
"@typescript-eslint/array-type": [
|
|
83
92
|
"error",
|
|
@@ -742,6 +751,14 @@ export default [
|
|
|
742
751
|
"prefer-template": "error",
|
|
743
752
|
"preserve-caught-error": "error",
|
|
744
753
|
"radix": "error",
|
|
754
|
+
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
755
|
+
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
756
|
+
"react-dom/no-missing-button-type": "error",
|
|
757
|
+
"react-dom/no-missing-iframe-sandbox": "error",
|
|
758
|
+
"react-dom/no-string-style-prop": "error",
|
|
759
|
+
"react-dom/no-unknown-property": "error",
|
|
760
|
+
"react-dom/no-unsafe-target-blank": "error",
|
|
761
|
+
"react-dom/no-void-elements-with-children": "error",
|
|
745
762
|
"react-hooks/exhaustive-deps": "error",
|
|
746
763
|
"react-hooks/rules-of-hooks": "error",
|
|
747
764
|
"react-refresh/only-export-components": [
|
|
@@ -750,6 +767,10 @@ export default [
|
|
|
750
767
|
"allowConstantExport": true
|
|
751
768
|
}
|
|
752
769
|
],
|
|
770
|
+
"react-web-api/no-leaked-event-listener": "error",
|
|
771
|
+
"react-web-api/no-leaked-interval": "error",
|
|
772
|
+
"react-web-api/no-leaked-resize-observer": "error",
|
|
773
|
+
"react-web-api/no-leaked-timeout": "error",
|
|
753
774
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
754
775
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
755
776
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
@@ -759,63 +780,23 @@ export default [
|
|
|
759
780
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
760
781
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
761
782
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
762
|
-
"react/button-has-type": "error",
|
|
763
|
-
"react/function-component-definition": [
|
|
764
|
-
"error",
|
|
765
|
-
{
|
|
766
|
-
"namedComponents": "function-declaration",
|
|
767
|
-
"unnamedComponents": "arrow-function"
|
|
768
|
-
}
|
|
769
|
-
],
|
|
770
|
-
"react/hook-use-state": "error",
|
|
771
|
-
"react/iframe-missing-sandbox": "error",
|
|
772
|
-
"react/jsx-boolean-value": [
|
|
773
|
-
"error",
|
|
774
|
-
"never"
|
|
775
|
-
],
|
|
776
|
-
"react/jsx-curly-brace-presence": [
|
|
777
|
-
"error",
|
|
778
|
-
{
|
|
779
|
-
"props": "never",
|
|
780
|
-
"children": "never"
|
|
781
|
-
}
|
|
782
|
-
],
|
|
783
|
-
"react/jsx-key": [
|
|
784
|
-
"error",
|
|
785
|
-
{
|
|
786
|
-
"checkFragmentShorthand": true
|
|
787
|
-
}
|
|
788
|
-
],
|
|
789
|
-
"react/jsx-no-bind": "error",
|
|
790
783
|
"react/jsx-no-comment-textnodes": "error",
|
|
791
|
-
"react/jsx-
|
|
792
|
-
"react/jsx-no-duplicate-props": "error",
|
|
793
|
-
"react/jsx-no-leaked-render": "error",
|
|
794
|
-
"react/jsx-no-target-blank": "error",
|
|
795
|
-
"react/jsx-no-undef": "error",
|
|
796
|
-
"react/jsx-no-useless-fragment": [
|
|
797
|
-
"error",
|
|
798
|
-
{
|
|
799
|
-
"allowExpressions": true
|
|
800
|
-
}
|
|
801
|
-
],
|
|
802
|
-
"react/jsx-pascal-case": "error",
|
|
784
|
+
"react/jsx-shorthand-boolean": "error",
|
|
803
785
|
"react/no-access-state-in-setstate": "error",
|
|
804
786
|
"react/no-array-index-key": "error",
|
|
805
787
|
"react/no-children-prop": "error",
|
|
806
|
-
"react/no-
|
|
807
|
-
"react/no-danger-with-children": "error",
|
|
808
|
-
"react/no-deprecated": "error",
|
|
788
|
+
"react/no-context-provider": "error",
|
|
809
789
|
"react/no-direct-mutation-state": "error",
|
|
810
|
-
"react/no-
|
|
811
|
-
"react/no-
|
|
812
|
-
"react/no-
|
|
813
|
-
"react/no-
|
|
814
|
-
"react/no-
|
|
790
|
+
"react/no-duplicate-key": "error",
|
|
791
|
+
"react/no-forward-ref": "error",
|
|
792
|
+
"react/no-leaked-conditional-rendering": "error",
|
|
793
|
+
"react/no-missing-key": "error",
|
|
794
|
+
"react/no-nested-component-definitions": "error",
|
|
795
|
+
"react/no-unstable-context-value": "error",
|
|
796
|
+
"react/no-unstable-default-props": "error",
|
|
815
797
|
"react/no-unused-state": "error",
|
|
816
|
-
"react/
|
|
817
|
-
"react/
|
|
818
|
-
"react/void-dom-elements-no-children": "error",
|
|
798
|
+
"react/no-use-context": "error",
|
|
799
|
+
"react/no-useless-fragment": "error",
|
|
819
800
|
"regexp/confusing-quantifier": "warn",
|
|
820
801
|
"regexp/control-character-escape": "error",
|
|
821
802
|
"regexp/match-any": "error",
|
package/dist/configs/2f6f3a82.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as mdxPlugin from "eslint-plugin-mdx"
|
|
4
4
|
import cspellPlugin from "@cspell/eslint-plugin"
|
|
5
5
|
import deMorganPlugin from "eslint-plugin-de-morgan"
|
|
6
|
+
import eslintReactPlugin from "@eslint-react/eslint-plugin"
|
|
6
7
|
import globals from "globals"
|
|
7
8
|
import importXPlugin from "eslint-plugin-import-x"
|
|
8
9
|
import jsdocPlugin from "eslint-plugin-jsdoc"
|
|
@@ -15,12 +16,12 @@ import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
|
15
16
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
16
17
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
17
18
|
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
18
|
-
import reactPlugin from "eslint-plugin-react"
|
|
19
19
|
import reactRefreshPlugin from "eslint-plugin-react-refresh"
|
|
20
20
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
21
21
|
import securityPlugin from "eslint-plugin-security"
|
|
22
22
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
23
23
|
import storybookPlugin from "eslint-plugin-storybook"
|
|
24
|
+
import stylisticPlugin from "@stylistic/eslint-plugin"
|
|
24
25
|
import testingLibraryPlugin from "eslint-plugin-testing-library"
|
|
25
26
|
import tseslint from "typescript-eslint"
|
|
26
27
|
import unicornPlugin from "eslint-plugin-unicorn"
|
|
@@ -36,6 +37,7 @@ export default [
|
|
|
36
37
|
name: "eslint-config-setup/base",
|
|
37
38
|
plugins: {
|
|
38
39
|
"@cspell": cspellPlugin,
|
|
40
|
+
"@stylistic": stylisticPlugin,
|
|
39
41
|
"@typescript-eslint": tseslint.plugin,
|
|
40
42
|
"de-morgan": deMorganPlugin,
|
|
41
43
|
"import": importXPlugin,
|
|
@@ -43,9 +45,11 @@ export default [
|
|
|
43
45
|
"jsx-a11y": jsxA11yPlugin,
|
|
44
46
|
"node": nodePlugin,
|
|
45
47
|
"perfectionist": perfectionistPlugin,
|
|
46
|
-
"react":
|
|
48
|
+
"react": eslintReactPlugin,
|
|
49
|
+
"react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
|
|
47
50
|
"react-hooks": reactHooksPlugin,
|
|
48
51
|
"react-refresh": reactRefreshPlugin,
|
|
52
|
+
"react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
|
|
49
53
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
50
54
|
"regexp": regexpPlugin,
|
|
51
55
|
"security": securityPlugin,
|
|
@@ -64,9 +68,6 @@ export default [
|
|
|
64
68
|
...globals.node,
|
|
65
69
|
},
|
|
66
70
|
},
|
|
67
|
-
settings: {
|
|
68
|
-
react: { version: "detect" },
|
|
69
|
-
},
|
|
70
71
|
rules: {
|
|
71
72
|
"@cspell/spellchecker": [
|
|
72
73
|
"warn",
|
|
@@ -77,6 +78,14 @@ export default [
|
|
|
77
78
|
"autoFix": false
|
|
78
79
|
}
|
|
79
80
|
],
|
|
81
|
+
"@stylistic/jsx-curly-brace-presence": [
|
|
82
|
+
"error",
|
|
83
|
+
{
|
|
84
|
+
"props": "never",
|
|
85
|
+
"children": "never"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"@stylistic/jsx-self-closing-comp": "error",
|
|
80
89
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
81
90
|
"@typescript-eslint/array-type": [
|
|
82
91
|
"error",
|
|
@@ -496,6 +505,14 @@ export default [
|
|
|
496
505
|
"prefer-template": "error",
|
|
497
506
|
"preserve-caught-error": "error",
|
|
498
507
|
"radix": "error",
|
|
508
|
+
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
509
|
+
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
510
|
+
"react-dom/no-missing-button-type": "error",
|
|
511
|
+
"react-dom/no-missing-iframe-sandbox": "error",
|
|
512
|
+
"react-dom/no-string-style-prop": "error",
|
|
513
|
+
"react-dom/no-unknown-property": "error",
|
|
514
|
+
"react-dom/no-unsafe-target-blank": "error",
|
|
515
|
+
"react-dom/no-void-elements-with-children": "error",
|
|
499
516
|
"react-hooks/exhaustive-deps": "error",
|
|
500
517
|
"react-hooks/rules-of-hooks": "error",
|
|
501
518
|
"react-refresh/only-export-components": [
|
|
@@ -504,6 +521,10 @@ export default [
|
|
|
504
521
|
"allowConstantExport": true
|
|
505
522
|
}
|
|
506
523
|
],
|
|
524
|
+
"react-web-api/no-leaked-event-listener": "error",
|
|
525
|
+
"react-web-api/no-leaked-interval": "error",
|
|
526
|
+
"react-web-api/no-leaked-resize-observer": "error",
|
|
527
|
+
"react-web-api/no-leaked-timeout": "error",
|
|
507
528
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
508
529
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
509
530
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
@@ -513,61 +534,23 @@ export default [
|
|
|
513
534
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
514
535
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
515
536
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
516
|
-
"react/button-has-type": "error",
|
|
517
|
-
"react/function-component-definition": [
|
|
518
|
-
"error",
|
|
519
|
-
{
|
|
520
|
-
"namedComponents": "function-declaration",
|
|
521
|
-
"unnamedComponents": "arrow-function"
|
|
522
|
-
}
|
|
523
|
-
],
|
|
524
|
-
"react/hook-use-state": "error",
|
|
525
|
-
"react/iframe-missing-sandbox": "error",
|
|
526
|
-
"react/jsx-boolean-value": [
|
|
527
|
-
"error",
|
|
528
|
-
"never"
|
|
529
|
-
],
|
|
530
|
-
"react/jsx-curly-brace-presence": [
|
|
531
|
-
"error",
|
|
532
|
-
{
|
|
533
|
-
"props": "never",
|
|
534
|
-
"children": "never"
|
|
535
|
-
}
|
|
536
|
-
],
|
|
537
|
-
"react/jsx-key": [
|
|
538
|
-
"error",
|
|
539
|
-
{
|
|
540
|
-
"checkFragmentShorthand": true
|
|
541
|
-
}
|
|
542
|
-
],
|
|
543
537
|
"react/jsx-no-comment-textnodes": "error",
|
|
544
|
-
"react/jsx-
|
|
545
|
-
"react/jsx-no-duplicate-props": "error",
|
|
546
|
-
"react/jsx-no-leaked-render": "error",
|
|
547
|
-
"react/jsx-no-target-blank": "error",
|
|
548
|
-
"react/jsx-no-undef": "error",
|
|
549
|
-
"react/jsx-no-useless-fragment": [
|
|
550
|
-
"error",
|
|
551
|
-
{
|
|
552
|
-
"allowExpressions": true
|
|
553
|
-
}
|
|
554
|
-
],
|
|
555
|
-
"react/jsx-pascal-case": "error",
|
|
538
|
+
"react/jsx-shorthand-boolean": "error",
|
|
556
539
|
"react/no-access-state-in-setstate": "error",
|
|
557
540
|
"react/no-array-index-key": "error",
|
|
558
541
|
"react/no-children-prop": "error",
|
|
559
|
-
"react/no-
|
|
560
|
-
"react/no-danger-with-children": "error",
|
|
561
|
-
"react/no-deprecated": "error",
|
|
542
|
+
"react/no-context-provider": "error",
|
|
562
543
|
"react/no-direct-mutation-state": "error",
|
|
563
|
-
"react/no-
|
|
564
|
-
"react/no-
|
|
565
|
-
"react/no-
|
|
566
|
-
"react/no-
|
|
544
|
+
"react/no-duplicate-key": "error",
|
|
545
|
+
"react/no-forward-ref": "error",
|
|
546
|
+
"react/no-leaked-conditional-rendering": "error",
|
|
547
|
+
"react/no-missing-key": "error",
|
|
548
|
+
"react/no-nested-component-definitions": "error",
|
|
549
|
+
"react/no-unstable-context-value": "error",
|
|
550
|
+
"react/no-unstable-default-props": "error",
|
|
567
551
|
"react/no-unused-state": "error",
|
|
568
|
-
"react/
|
|
569
|
-
"react/
|
|
570
|
-
"react/void-dom-elements-no-children": "error",
|
|
552
|
+
"react/no-use-context": "error",
|
|
553
|
+
"react/no-useless-fragment": "error",
|
|
571
554
|
"regexp/confusing-quantifier": "warn",
|
|
572
555
|
"regexp/control-character-escape": "error",
|
|
573
556
|
"regexp/match-any": "error",
|
package/dist/configs/4eb62e57.js
CHANGED
|
@@ -13,7 +13,6 @@ import oxlintPlugin from "eslint-plugin-oxlint"
|
|
|
13
13
|
import packageJsonPlugin from "eslint-plugin-package-json"
|
|
14
14
|
import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
15
15
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
16
|
-
import reactPlugin from "eslint-plugin-react"
|
|
17
16
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
18
17
|
import securityPlugin from "eslint-plugin-security"
|
|
19
18
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
@@ -40,7 +39,6 @@ export default [
|
|
|
40
39
|
"jsx-a11y": jsxA11yPlugin,
|
|
41
40
|
"node": nodePlugin,
|
|
42
41
|
"perfectionist": perfectionistPlugin,
|
|
43
|
-
"react": reactPlugin,
|
|
44
42
|
"regexp": regexpPlugin,
|
|
45
43
|
"security": securityPlugin,
|
|
46
44
|
"sonarjs": sonarjsPlugin,
|
|
@@ -727,8 +725,6 @@ export default [
|
|
|
727
725
|
"prefer-template": "error",
|
|
728
726
|
"preserve-caught-error": "error",
|
|
729
727
|
"radix": "error",
|
|
730
|
-
"react/jsx-no-bind": "error",
|
|
731
|
-
"react/no-multi-comp": "error",
|
|
732
728
|
"regexp/confusing-quantifier": "warn",
|
|
733
729
|
"regexp/control-character-escape": "error",
|
|
734
730
|
"regexp/match-any": "error",
|
package/dist/configs/52762a42.js
CHANGED
|
@@ -12,7 +12,6 @@ import nodePlugin from "eslint-plugin-n"
|
|
|
12
12
|
import packageJsonPlugin from "eslint-plugin-package-json"
|
|
13
13
|
import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
14
14
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
15
|
-
import reactPlugin from "eslint-plugin-react"
|
|
16
15
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
17
16
|
import securityPlugin from "eslint-plugin-security"
|
|
18
17
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
@@ -40,7 +39,6 @@ export default [
|
|
|
40
39
|
"jsx-a11y": jsxA11yPlugin,
|
|
41
40
|
"node": nodePlugin,
|
|
42
41
|
"perfectionist": perfectionistPlugin,
|
|
43
|
-
"react": reactPlugin,
|
|
44
42
|
"regexp": regexpPlugin,
|
|
45
43
|
"security": securityPlugin,
|
|
46
44
|
"sonarjs": sonarjsPlugin,
|
|
@@ -698,8 +696,6 @@ export default [
|
|
|
698
696
|
"prefer-template": "error",
|
|
699
697
|
"preserve-caught-error": "error",
|
|
700
698
|
"radix": "error",
|
|
701
|
-
"react/jsx-no-bind": "error",
|
|
702
|
-
"react/no-multi-comp": "error",
|
|
703
699
|
"regexp/confusing-quantifier": "warn",
|
|
704
700
|
"regexp/control-character-escape": "error",
|
|
705
701
|
"regexp/match-any": "error",
|
package/dist/configs/532f50a4.js
CHANGED
|
@@ -4,6 +4,7 @@ import * as mdxPlugin from "eslint-plugin-mdx"
|
|
|
4
4
|
import compatPlugin from "eslint-plugin-compat"
|
|
5
5
|
import cspellPlugin from "@cspell/eslint-plugin"
|
|
6
6
|
import deMorganPlugin from "eslint-plugin-de-morgan"
|
|
7
|
+
import eslintReactPlugin from "@eslint-react/eslint-plugin"
|
|
7
8
|
import globals from "globals"
|
|
8
9
|
import importXPlugin from "eslint-plugin-import-x"
|
|
9
10
|
import jsdocPlugin from "eslint-plugin-jsdoc"
|
|
@@ -14,12 +15,12 @@ import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
|
14
15
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
15
16
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
16
17
|
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
17
|
-
import reactPlugin from "eslint-plugin-react"
|
|
18
18
|
import reactRefreshPlugin from "eslint-plugin-react-refresh"
|
|
19
19
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
20
20
|
import securityPlugin from "eslint-plugin-security"
|
|
21
21
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
22
22
|
import storybookPlugin from "eslint-plugin-storybook"
|
|
23
|
+
import stylisticPlugin from "@stylistic/eslint-plugin"
|
|
23
24
|
import testingLibraryPlugin from "eslint-plugin-testing-library"
|
|
24
25
|
import tseslint from "typescript-eslint"
|
|
25
26
|
import unicornPlugin from "eslint-plugin-unicorn"
|
|
@@ -35,6 +36,7 @@ export default [
|
|
|
35
36
|
name: "eslint-config-setup/base",
|
|
36
37
|
plugins: {
|
|
37
38
|
"@cspell": cspellPlugin,
|
|
39
|
+
"@stylistic": stylisticPlugin,
|
|
38
40
|
"@typescript-eslint": tseslint.plugin,
|
|
39
41
|
"compat": compatPlugin,
|
|
40
42
|
"de-morgan": deMorganPlugin,
|
|
@@ -42,9 +44,11 @@ export default [
|
|
|
42
44
|
"jsdoc": jsdocPlugin,
|
|
43
45
|
"jsx-a11y": jsxA11yPlugin,
|
|
44
46
|
"perfectionist": perfectionistPlugin,
|
|
45
|
-
"react":
|
|
47
|
+
"react": eslintReactPlugin,
|
|
48
|
+
"react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
|
|
46
49
|
"react-hooks": reactHooksPlugin,
|
|
47
50
|
"react-refresh": reactRefreshPlugin,
|
|
51
|
+
"react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
|
|
48
52
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
49
53
|
"regexp": regexpPlugin,
|
|
50
54
|
"security": securityPlugin,
|
|
@@ -62,9 +66,6 @@ export default [
|
|
|
62
66
|
...globals.browser,
|
|
63
67
|
},
|
|
64
68
|
},
|
|
65
|
-
settings: {
|
|
66
|
-
react: { version: "detect" },
|
|
67
|
-
},
|
|
68
69
|
rules: {
|
|
69
70
|
"@cspell/spellchecker": [
|
|
70
71
|
"warn",
|
|
@@ -75,6 +76,14 @@ export default [
|
|
|
75
76
|
"autoFix": false
|
|
76
77
|
}
|
|
77
78
|
],
|
|
79
|
+
"@stylistic/jsx-curly-brace-presence": [
|
|
80
|
+
"error",
|
|
81
|
+
{
|
|
82
|
+
"props": "never",
|
|
83
|
+
"children": "never"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"@stylistic/jsx-self-closing-comp": "error",
|
|
78
87
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
79
88
|
"@typescript-eslint/array-type": [
|
|
80
89
|
"error",
|
|
@@ -468,6 +477,14 @@ export default [
|
|
|
468
477
|
"prefer-template": "error",
|
|
469
478
|
"preserve-caught-error": "error",
|
|
470
479
|
"radix": "error",
|
|
480
|
+
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
481
|
+
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
482
|
+
"react-dom/no-missing-button-type": "error",
|
|
483
|
+
"react-dom/no-missing-iframe-sandbox": "error",
|
|
484
|
+
"react-dom/no-string-style-prop": "error",
|
|
485
|
+
"react-dom/no-unknown-property": "error",
|
|
486
|
+
"react-dom/no-unsafe-target-blank": "error",
|
|
487
|
+
"react-dom/no-void-elements-with-children": "error",
|
|
471
488
|
"react-hooks/exhaustive-deps": "error",
|
|
472
489
|
"react-hooks/rules-of-hooks": "error",
|
|
473
490
|
"react-refresh/only-export-components": [
|
|
@@ -476,6 +493,10 @@ export default [
|
|
|
476
493
|
"allowConstantExport": true
|
|
477
494
|
}
|
|
478
495
|
],
|
|
496
|
+
"react-web-api/no-leaked-event-listener": "error",
|
|
497
|
+
"react-web-api/no-leaked-interval": "error",
|
|
498
|
+
"react-web-api/no-leaked-resize-observer": "error",
|
|
499
|
+
"react-web-api/no-leaked-timeout": "error",
|
|
479
500
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
480
501
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
481
502
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
@@ -485,61 +506,23 @@ export default [
|
|
|
485
506
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
486
507
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
487
508
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
488
|
-
"react/button-has-type": "error",
|
|
489
|
-
"react/function-component-definition": [
|
|
490
|
-
"error",
|
|
491
|
-
{
|
|
492
|
-
"namedComponents": "function-declaration",
|
|
493
|
-
"unnamedComponents": "arrow-function"
|
|
494
|
-
}
|
|
495
|
-
],
|
|
496
|
-
"react/hook-use-state": "error",
|
|
497
|
-
"react/iframe-missing-sandbox": "error",
|
|
498
|
-
"react/jsx-boolean-value": [
|
|
499
|
-
"error",
|
|
500
|
-
"never"
|
|
501
|
-
],
|
|
502
|
-
"react/jsx-curly-brace-presence": [
|
|
503
|
-
"error",
|
|
504
|
-
{
|
|
505
|
-
"props": "never",
|
|
506
|
-
"children": "never"
|
|
507
|
-
}
|
|
508
|
-
],
|
|
509
|
-
"react/jsx-key": [
|
|
510
|
-
"error",
|
|
511
|
-
{
|
|
512
|
-
"checkFragmentShorthand": true
|
|
513
|
-
}
|
|
514
|
-
],
|
|
515
509
|
"react/jsx-no-comment-textnodes": "error",
|
|
516
|
-
"react/jsx-
|
|
517
|
-
"react/jsx-no-duplicate-props": "error",
|
|
518
|
-
"react/jsx-no-leaked-render": "error",
|
|
519
|
-
"react/jsx-no-target-blank": "error",
|
|
520
|
-
"react/jsx-no-undef": "error",
|
|
521
|
-
"react/jsx-no-useless-fragment": [
|
|
522
|
-
"error",
|
|
523
|
-
{
|
|
524
|
-
"allowExpressions": true
|
|
525
|
-
}
|
|
526
|
-
],
|
|
527
|
-
"react/jsx-pascal-case": "error",
|
|
510
|
+
"react/jsx-shorthand-boolean": "error",
|
|
528
511
|
"react/no-access-state-in-setstate": "error",
|
|
529
512
|
"react/no-array-index-key": "error",
|
|
530
513
|
"react/no-children-prop": "error",
|
|
531
|
-
"react/no-
|
|
532
|
-
"react/no-danger-with-children": "error",
|
|
533
|
-
"react/no-deprecated": "error",
|
|
514
|
+
"react/no-context-provider": "error",
|
|
534
515
|
"react/no-direct-mutation-state": "error",
|
|
535
|
-
"react/no-
|
|
536
|
-
"react/no-
|
|
537
|
-
"react/no-
|
|
538
|
-
"react/no-
|
|
516
|
+
"react/no-duplicate-key": "error",
|
|
517
|
+
"react/no-forward-ref": "error",
|
|
518
|
+
"react/no-leaked-conditional-rendering": "error",
|
|
519
|
+
"react/no-missing-key": "error",
|
|
520
|
+
"react/no-nested-component-definitions": "error",
|
|
521
|
+
"react/no-unstable-context-value": "error",
|
|
522
|
+
"react/no-unstable-default-props": "error",
|
|
539
523
|
"react/no-unused-state": "error",
|
|
540
|
-
"react/
|
|
541
|
-
"react/
|
|
542
|
-
"react/void-dom-elements-no-children": "error",
|
|
524
|
+
"react/no-use-context": "error",
|
|
525
|
+
"react/no-useless-fragment": "error",
|
|
543
526
|
"regexp/confusing-quantifier": "warn",
|
|
544
527
|
"regexp/control-character-escape": "error",
|
|
545
528
|
"regexp/match-any": "error",
|