eslint-config-setup 0.2.7 → 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.
@@ -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"
@@ -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
  "de-morgan": deMorganPlugin,
40
42
  "import": importXPlugin,
@@ -42,9 +44,11 @@ export default [
42
44
  "jsx-a11y": jsxA11yPlugin,
43
45
  "node": nodePlugin,
44
46
  "perfectionist": perfectionistPlugin,
45
- "react": reactPlugin,
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,
@@ -63,9 +67,6 @@ export default [
63
67
  ...globals.node,
64
68
  },
65
69
  },
66
- settings: {
67
- react: { version: "detect" },
68
- },
69
70
  rules: {
70
71
  "@cspell/spellchecker": [
71
72
  "warn",
@@ -76,6 +77,14 @@ export default [
76
77
  "autoFix": false
77
78
  }
78
79
  ],
80
+ "@stylistic/jsx-curly-brace-presence": [
81
+ "error",
82
+ {
83
+ "props": "never",
84
+ "children": "never"
85
+ }
86
+ ],
87
+ "@stylistic/jsx-self-closing-comp": "error",
79
88
  "@typescript-eslint/adjacent-overload-signatures": "error",
80
89
  "@typescript-eslint/array-type": [
81
90
  "error",
@@ -495,8 +504,15 @@ export default [
495
504
  "prefer-template": "error",
496
505
  "preserve-caught-error": "error",
497
506
  "radix": "error",
507
+ "react-dom/no-dangerously-set-innerhtml": "warn",
508
+ "react-dom/no-dangerously-set-innerhtml-with-children": "error",
509
+ "react-dom/no-missing-button-type": "error",
510
+ "react-dom/no-missing-iframe-sandbox": "error",
511
+ "react-dom/no-string-style-prop": "error",
512
+ "react-dom/no-unknown-property": "error",
513
+ "react-dom/no-unsafe-target-blank": "error",
514
+ "react-dom/no-void-elements-with-children": "error",
498
515
  "react-hooks/exhaustive-deps": "error",
499
- "react-hooks/react-compiler": "error",
500
516
  "react-hooks/rules-of-hooks": "error",
501
517
  "react-refresh/only-export-components": [
502
518
  "warn",
@@ -504,6 +520,10 @@ export default [
504
520
  "allowConstantExport": true
505
521
  }
506
522
  ],
523
+ "react-web-api/no-leaked-event-listener": "error",
524
+ "react-web-api/no-leaked-interval": "error",
525
+ "react-web-api/no-leaked-resize-observer": "error",
526
+ "react-web-api/no-leaked-timeout": "error",
507
527
  "react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
508
528
  "react-you-might-not-need-an-effect/no-chain-state-updates": "error",
509
529
  "react-you-might-not-need-an-effect/no-derived-state": "error",
@@ -513,61 +533,23 @@ export default [
513
533
  "react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
514
534
  "react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
515
535
  "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
536
  "react/jsx-no-comment-textnodes": "error",
544
- "react/jsx-no-constructed-context-values": "error",
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",
537
+ "react/jsx-shorthand-boolean": "error",
556
538
  "react/no-access-state-in-setstate": "error",
557
539
  "react/no-array-index-key": "error",
558
540
  "react/no-children-prop": "error",
559
- "react/no-danger": "warn",
560
- "react/no-danger-with-children": "error",
561
- "react/no-deprecated": "error",
541
+ "react/no-context-provider": "error",
562
542
  "react/no-direct-mutation-state": "error",
563
- "react/no-object-type-as-default-prop": "error",
564
- "react/no-string-refs": "error",
565
- "react/no-unknown-property": "error",
566
- "react/no-unstable-nested-components": "error",
543
+ "react/no-duplicate-key": "error",
544
+ "react/no-forward-ref": "error",
545
+ "react/no-leaked-conditional-rendering": "error",
546
+ "react/no-missing-key": "error",
547
+ "react/no-nested-component-definitions": "error",
548
+ "react/no-unstable-context-value": "error",
549
+ "react/no-unstable-default-props": "error",
567
550
  "react/no-unused-state": "error",
568
- "react/self-closing-comp": "error",
569
- "react/style-prop-object": "error",
570
- "react/void-dom-elements-no-children": "error",
551
+ "react/no-use-context": "error",
552
+ "react/no-useless-fragment": "error",
571
553
  "regexp/confusing-quantifier": "warn",
572
554
  "regexp/control-character-escape": "error",
573
555
  "regexp/match-any": "error",
@@ -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"
@@ -39,7 +38,6 @@ export default [
39
38
  "jsx-a11y": jsxA11yPlugin,
40
39
  "node": nodePlugin,
41
40
  "perfectionist": perfectionistPlugin,
42
- "react": reactPlugin,
43
41
  "regexp": regexpPlugin,
44
42
  "security": securityPlugin,
45
43
  "sonarjs": sonarjsPlugin,
@@ -107,7 +105,7 @@ export default [
107
105
  "allowExpressions": true,
108
106
  "allowTypedFunctionExpressions": true,
109
107
  "allowHigherOrderFunctions": true,
110
- "allowIIFE": true
108
+ "allowIIFEs": true
111
109
  }
112
110
  ],
113
111
  "@typescript-eslint/explicit-member-accessibility": "error",
@@ -726,8 +724,6 @@ export default [
726
724
  "prefer-template": "error",
727
725
  "preserve-caught-error": "error",
728
726
  "radix": "error",
729
- "react/jsx-no-bind": "error",
730
- "react/no-multi-comp": "error",
731
727
  "regexp/confusing-quantifier": "warn",
732
728
  "regexp/control-character-escape": "error",
733
729
  "regexp/match-any": "error",
@@ -822,7 +818,7 @@ export default [
822
818
  "sonarjs/max-union-size": [
823
819
  "error",
824
820
  {
825
- "max": 5
821
+ "threshold": 5
826
822
  }
827
823
  ],
828
824
  "sonarjs/no-async-constructor": "error",
@@ -920,7 +916,6 @@ export default [
920
916
  "unicorn/prefer-at": "error",
921
917
  "unicorn/prefer-date-now": "error",
922
918
  "unicorn/prefer-default-parameters": "error",
923
- "unicorn/prefer-early-return": "error",
924
919
  "unicorn/prefer-export-from": [
925
920
  "error",
926
921
  {
@@ -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"
@@ -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
  "de-morgan": deMorganPlugin,
40
42
  "import": importXPlugin,
@@ -42,9 +44,11 @@ export default [
42
44
  "jsx-a11y": jsxA11yPlugin,
43
45
  "node": nodePlugin,
44
46
  "perfectionist": perfectionistPlugin,
45
- "react": reactPlugin,
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,
@@ -63,9 +67,6 @@ export default [
63
67
  ...globals.node,
64
68
  },
65
69
  },
66
- settings: {
67
- react: { version: "detect" },
68
- },
69
70
  rules: {
70
71
  "@cspell/spellchecker": [
71
72
  "warn",
@@ -76,6 +77,14 @@ export default [
76
77
  "autoFix": false
77
78
  }
78
79
  ],
80
+ "@stylistic/jsx-curly-brace-presence": [
81
+ "error",
82
+ {
83
+ "props": "never",
84
+ "children": "never"
85
+ }
86
+ ],
87
+ "@stylistic/jsx-self-closing-comp": "error",
79
88
  "@typescript-eslint/adjacent-overload-signatures": "error",
80
89
  "@typescript-eslint/array-type": [
81
90
  "error",
@@ -118,7 +127,7 @@ export default [
118
127
  "allowExpressions": true,
119
128
  "allowTypedFunctionExpressions": true,
120
129
  "allowHigherOrderFunctions": true,
121
- "allowIIFE": true
130
+ "allowIIFEs": true
122
131
  }
123
132
  ],
124
133
  "@typescript-eslint/explicit-member-accessibility": "error",
@@ -766,8 +775,15 @@ export default [
766
775
  "prefer-template": "error",
767
776
  "preserve-caught-error": "error",
768
777
  "radix": "error",
778
+ "react-dom/no-dangerously-set-innerhtml": "warn",
779
+ "react-dom/no-dangerously-set-innerhtml-with-children": "error",
780
+ "react-dom/no-missing-button-type": "error",
781
+ "react-dom/no-missing-iframe-sandbox": "error",
782
+ "react-dom/no-string-style-prop": "error",
783
+ "react-dom/no-unknown-property": "error",
784
+ "react-dom/no-unsafe-target-blank": "error",
785
+ "react-dom/no-void-elements-with-children": "error",
769
786
  "react-hooks/exhaustive-deps": "error",
770
- "react-hooks/react-compiler": "error",
771
787
  "react-hooks/rules-of-hooks": "error",
772
788
  "react-refresh/only-export-components": [
773
789
  "warn",
@@ -775,6 +791,10 @@ export default [
775
791
  "allowConstantExport": true
776
792
  }
777
793
  ],
794
+ "react-web-api/no-leaked-event-listener": "error",
795
+ "react-web-api/no-leaked-interval": "error",
796
+ "react-web-api/no-leaked-resize-observer": "error",
797
+ "react-web-api/no-leaked-timeout": "error",
778
798
  "react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
779
799
  "react-you-might-not-need-an-effect/no-chain-state-updates": "error",
780
800
  "react-you-might-not-need-an-effect/no-derived-state": "error",
@@ -784,63 +804,23 @@ export default [
784
804
  "react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
785
805
  "react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
786
806
  "react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
787
- "react/button-has-type": "error",
788
- "react/function-component-definition": [
789
- "error",
790
- {
791
- "namedComponents": "function-declaration",
792
- "unnamedComponents": "arrow-function"
793
- }
794
- ],
795
- "react/hook-use-state": "error",
796
- "react/iframe-missing-sandbox": "error",
797
- "react/jsx-boolean-value": [
798
- "error",
799
- "never"
800
- ],
801
- "react/jsx-curly-brace-presence": [
802
- "error",
803
- {
804
- "props": "never",
805
- "children": "never"
806
- }
807
- ],
808
- "react/jsx-key": [
809
- "error",
810
- {
811
- "checkFragmentShorthand": true
812
- }
813
- ],
814
- "react/jsx-no-bind": "error",
815
807
  "react/jsx-no-comment-textnodes": "error",
816
- "react/jsx-no-constructed-context-values": "error",
817
- "react/jsx-no-duplicate-props": "error",
818
- "react/jsx-no-leaked-render": "error",
819
- "react/jsx-no-target-blank": "error",
820
- "react/jsx-no-undef": "error",
821
- "react/jsx-no-useless-fragment": [
822
- "error",
823
- {
824
- "allowExpressions": true
825
- }
826
- ],
827
- "react/jsx-pascal-case": "error",
808
+ "react/jsx-shorthand-boolean": "error",
828
809
  "react/no-access-state-in-setstate": "error",
829
810
  "react/no-array-index-key": "error",
830
811
  "react/no-children-prop": "error",
831
- "react/no-danger": "warn",
832
- "react/no-danger-with-children": "error",
833
- "react/no-deprecated": "error",
812
+ "react/no-context-provider": "error",
834
813
  "react/no-direct-mutation-state": "error",
835
- "react/no-multi-comp": "error",
836
- "react/no-object-type-as-default-prop": "error",
837
- "react/no-string-refs": "error",
838
- "react/no-unknown-property": "error",
839
- "react/no-unstable-nested-components": "error",
814
+ "react/no-duplicate-key": "error",
815
+ "react/no-forward-ref": "error",
816
+ "react/no-leaked-conditional-rendering": "error",
817
+ "react/no-missing-key": "error",
818
+ "react/no-nested-component-definitions": "error",
819
+ "react/no-unstable-context-value": "error",
820
+ "react/no-unstable-default-props": "error",
840
821
  "react/no-unused-state": "error",
841
- "react/self-closing-comp": "error",
842
- "react/style-prop-object": "error",
843
- "react/void-dom-elements-no-children": "error",
822
+ "react/no-use-context": "error",
823
+ "react/no-useless-fragment": "error",
844
824
  "regexp/confusing-quantifier": "warn",
845
825
  "regexp/control-character-escape": "error",
846
826
  "regexp/match-any": "error",
@@ -935,7 +915,7 @@ export default [
935
915
  "sonarjs/max-union-size": [
936
916
  "error",
937
917
  {
938
- "max": 5
918
+ "threshold": 5
939
919
  }
940
920
  ],
941
921
  "sonarjs/no-async-constructor": "error",
@@ -1033,7 +1013,6 @@ export default [
1033
1013
  "unicorn/prefer-at": "error",
1034
1014
  "unicorn/prefer-date-now": "error",
1035
1015
  "unicorn/prefer-default-parameters": "error",
1036
- "unicorn/prefer-early-return": "error",
1037
1016
  "unicorn/prefer-export-from": [
1038
1017
  "error",
1039
1018
  {
@@ -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": reactPlugin,
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",
@@ -119,7 +128,7 @@ export default [
119
128
  "allowExpressions": true,
120
129
  "allowTypedFunctionExpressions": true,
121
130
  "allowHigherOrderFunctions": true,
122
- "allowIIFE": true
131
+ "allowIIFEs": true
123
132
  }
124
133
  ],
125
134
  "@typescript-eslint/explicit-member-accessibility": "error",
@@ -767,8 +776,15 @@ export default [
767
776
  "prefer-template": "error",
768
777
  "preserve-caught-error": "error",
769
778
  "radix": "error",
779
+ "react-dom/no-dangerously-set-innerhtml": "warn",
780
+ "react-dom/no-dangerously-set-innerhtml-with-children": "error",
781
+ "react-dom/no-missing-button-type": "error",
782
+ "react-dom/no-missing-iframe-sandbox": "error",
783
+ "react-dom/no-string-style-prop": "error",
784
+ "react-dom/no-unknown-property": "error",
785
+ "react-dom/no-unsafe-target-blank": "error",
786
+ "react-dom/no-void-elements-with-children": "error",
770
787
  "react-hooks/exhaustive-deps": "error",
771
- "react-hooks/react-compiler": "error",
772
788
  "react-hooks/rules-of-hooks": "error",
773
789
  "react-refresh/only-export-components": [
774
790
  "warn",
@@ -776,6 +792,10 @@ export default [
776
792
  "allowConstantExport": true
777
793
  }
778
794
  ],
795
+ "react-web-api/no-leaked-event-listener": "error",
796
+ "react-web-api/no-leaked-interval": "error",
797
+ "react-web-api/no-leaked-resize-observer": "error",
798
+ "react-web-api/no-leaked-timeout": "error",
779
799
  "react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
780
800
  "react-you-might-not-need-an-effect/no-chain-state-updates": "error",
781
801
  "react-you-might-not-need-an-effect/no-derived-state": "error",
@@ -785,63 +805,23 @@ export default [
785
805
  "react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
786
806
  "react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
787
807
  "react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
788
- "react/button-has-type": "error",
789
- "react/function-component-definition": [
790
- "error",
791
- {
792
- "namedComponents": "function-declaration",
793
- "unnamedComponents": "arrow-function"
794
- }
795
- ],
796
- "react/hook-use-state": "error",
797
- "react/iframe-missing-sandbox": "error",
798
- "react/jsx-boolean-value": [
799
- "error",
800
- "never"
801
- ],
802
- "react/jsx-curly-brace-presence": [
803
- "error",
804
- {
805
- "props": "never",
806
- "children": "never"
807
- }
808
- ],
809
- "react/jsx-key": [
810
- "error",
811
- {
812
- "checkFragmentShorthand": true
813
- }
814
- ],
815
- "react/jsx-no-bind": "error",
816
808
  "react/jsx-no-comment-textnodes": "error",
817
- "react/jsx-no-constructed-context-values": "error",
818
- "react/jsx-no-duplicate-props": "error",
819
- "react/jsx-no-leaked-render": "error",
820
- "react/jsx-no-target-blank": "error",
821
- "react/jsx-no-undef": "error",
822
- "react/jsx-no-useless-fragment": [
823
- "error",
824
- {
825
- "allowExpressions": true
826
- }
827
- ],
828
- "react/jsx-pascal-case": "error",
809
+ "react/jsx-shorthand-boolean": "error",
829
810
  "react/no-access-state-in-setstate": "error",
830
811
  "react/no-array-index-key": "error",
831
812
  "react/no-children-prop": "error",
832
- "react/no-danger": "warn",
833
- "react/no-danger-with-children": "error",
834
- "react/no-deprecated": "error",
813
+ "react/no-context-provider": "error",
835
814
  "react/no-direct-mutation-state": "error",
836
- "react/no-multi-comp": "error",
837
- "react/no-object-type-as-default-prop": "error",
838
- "react/no-string-refs": "error",
839
- "react/no-unknown-property": "error",
840
- "react/no-unstable-nested-components": "error",
815
+ "react/no-duplicate-key": "error",
816
+ "react/no-forward-ref": "error",
817
+ "react/no-leaked-conditional-rendering": "error",
818
+ "react/no-missing-key": "error",
819
+ "react/no-nested-component-definitions": "error",
820
+ "react/no-unstable-context-value": "error",
821
+ "react/no-unstable-default-props": "error",
841
822
  "react/no-unused-state": "error",
842
- "react/self-closing-comp": "error",
843
- "react/style-prop-object": "error",
844
- "react/void-dom-elements-no-children": "error",
823
+ "react/no-use-context": "error",
824
+ "react/no-useless-fragment": "error",
845
825
  "regexp/confusing-quantifier": "warn",
846
826
  "regexp/control-character-escape": "error",
847
827
  "regexp/match-any": "error",
@@ -936,7 +916,7 @@ export default [
936
916
  "sonarjs/max-union-size": [
937
917
  "error",
938
918
  {
939
- "max": 5
919
+ "threshold": 5
940
920
  }
941
921
  ],
942
922
  "sonarjs/no-async-constructor": "error",
@@ -1034,7 +1014,6 @@ export default [
1034
1014
  "unicorn/prefer-at": "error",
1035
1015
  "unicorn/prefer-date-now": "error",
1036
1016
  "unicorn/prefer-default-parameters": "error",
1037
- "unicorn/prefer-early-return": "error",
1038
1017
  "unicorn/prefer-export-from": [
1039
1018
  "error",
1040
1019
  {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ConfigOptions, F as FlatConfigArray, O as OxlintConfigOptions, R as RuleSeverity, a as RuleOptions } from './types-3d-g2_B9.js';
2
- export { b as RuleScope } from './types-3d-g2_B9.js';
1
+ import { C as ConfigOptions, F as FlatConfigArray, O as OxlintConfigOptions, R as RuleSeverity, a as RuleOptions } from './types-D227zLeg.js';
2
+ export { b as RuleScope } from './types-D227zLeg.js';
3
3
  import 'eslint';
4
4
 
5
5
  /**
package/dist/modules.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { F as FlatConfigArray, C as ConfigOptions } from './types-3d-g2_B9.js';
1
+ import { F as FlatConfigArray, C as ConfigOptions } from './types-D227zLeg.js';
2
2
  import 'eslint';
3
3
 
4
4
  /**
@@ -11,7 +11,7 @@ import 'eslint';
11
11
  *
12
12
  * No plugin preset is used — all rules are hand-picked from existing plugins
13
13
  * and tightened beyond their defaults for AI-generated code.
14
- * @see ADR-0003: docs/adr/0003-ai-mode-as-dedicated-flag.md
14
+ * @see ADR-0006: docs/adr/0006-ai-mode-as-dedicated-flag.md
15
15
  */
16
16
  declare function aiConfig(): FlatConfigArray;
17
17
 
@@ -163,18 +163,17 @@ declare function perfectionistAiConfig(): FlatConfigArray;
163
163
  declare function prettierCompatConfig(): FlatConfigArray;
164
164
 
165
165
  /**
166
- * React config — React 19+, Hooks (incl. Compiler), and JSX accessibility.
166
+ * React config — React 19+, Hooks, JSX accessibility, and Web API leak detection.
167
167
  *
168
- * We hand-pick rules instead of using plugin presets because:
169
- * - `eslint-plugin-react`'s recommended preset includes `react-in-jsx-scope` which
170
- * is unnecessary since React 17 JSX transform
171
- * - We want explicit control over each rule and its severity
172
- * - jsx-a11y has no flat config preset yet
168
+ * Uses `@eslint-react` (eslint-plugin-react-x) as the primary React linting plugin,
169
+ * replacing the unmaintained eslint-plugin-react. Plugins are registered under
170
+ * familiar namespaces (`react/`, `react-dom/`, `react-hooks/`) for compatibility
171
+ * with OxLint and user overrides the same pattern used for `import` (import-x)
172
+ * and `node` (eslint-plugin-n).
173
173
  *
174
- * Since React Compiler v1.0, compiler rules are included in eslint-plugin-react-hooks
175
- * (>= 7.0.0). The standalone eslint-plugin-react-compiler is deprecated.
174
+ * Stylistic JSX rules (self-closing, curly braces) are provided by `@stylistic`.
176
175
  *
177
- * @see https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules
176
+ * @see https://eslint-react.xyz/docs/rules/overview
178
177
  * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
179
178
  * @see https://github.com/ArnaudBarre/eslint-plugin-react-refresh
180
179
  * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#supported-rules