@@ -84,6 +84,9 @@ export async function react(
84
84
name : 'coderwyd/react/rules' ,
85
85
rules : {
86
86
// recommended rules from eslint-plugin-react-x https://eslint-react.xyz/docs/rules/overview#core-rules
87
+ 'react/jsx-no-comment-textnodes' : 'warn' ,
88
+ 'react/jsx-no-duplicate-props' : 'warn' ,
89
+ 'react/jsx-uses-vars' : 'warn' ,
87
90
'react/no-access-state-in-setstate' : 'error' ,
88
91
'react/no-array-index-key' : 'warn' ,
89
92
'react/no-children-count' : 'warn' ,
@@ -92,15 +95,13 @@ export async function react(
92
95
'react/no-children-only' : 'warn' ,
93
96
'react/no-children-to-array' : 'warn' ,
94
97
'react/no-clone-element' : 'warn' ,
95
- 'react/no-comment-textnodes' : 'warn' ,
96
98
'react/no-component-will-mount' : 'error' ,
97
99
'react/no-component-will-receive-props' : 'error' ,
98
100
'react/no-component-will-update' : 'error' ,
99
101
'react/no-context-provider' : 'warn' ,
100
102
'react/no-create-ref' : 'error' ,
101
103
'react/no-default-props' : 'error' ,
102
104
'react/no-direct-mutation-state' : 'error' ,
103
- 'react/no-duplicate-jsx-props' : 'warn' ,
104
105
'react/no-duplicate-key' : 'warn' ,
105
106
'react/no-forward-ref' : 'warn' ,
106
107
'react/no-implicit-key' : 'warn' ,
@@ -112,6 +113,7 @@ export async function react(
112
113
'react/no-set-state-in-component-did-update' : 'warn' ,
113
114
'react/no-set-state-in-component-will-update' : 'warn' ,
114
115
'react/no-string-refs' : 'error' ,
116
+ 'react/no-unnecessary-use-prefix' : 'warn' ,
115
117
'react/no-unsafe-component-will-mount' : 'warn' ,
116
118
'react/no-unsafe-component-will-receive-props' : 'warn' ,
117
119
'react/no-unsafe-component-will-update' : 'warn' ,
@@ -121,7 +123,7 @@ export async function react(
121
123
'react/no-unused-state' : 'warn' ,
122
124
'react/no-use-context' : 'warn' ,
123
125
'react/no-useless-forward-ref' : 'warn' ,
124
- 'react/use-jsx-vars ' : 'warn' ,
126
+ 'react/prefer- use-state-lazy-initialization ' : 'warn' ,
125
127
126
128
// recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
127
129
'react-dom/no-dangerously-set-innerhtml' : 'warn' ,
@@ -143,11 +145,9 @@ export async function react(
143
145
// recommended rules eslint-plugin-react-hooks https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks/src/rules
144
146
'react-hooks/exhaustive-deps' : 'warn' ,
145
147
'react-hooks/rules-of-hooks' : 'error' ,
146
- 'react-hooks/react-compiler' : 'warn' ,
147
148
148
149
// recommended rules from eslint-plugin-react-hooks-extra https://eslint-react.xyz/docs/rules/overview#hooks-extra-rules
149
150
'react-hooks-extra/no-direct-set-state-in-use-effect' : 'warn' ,
150
- 'react-hooks-extra/no-unnecessary-use-prefix' : 'warn' ,
151
151
152
152
// recommended rules from eslint-plugin-react-web-api https://eslint-react.xyz/docs/rules/overview#web-api-rules
153
153
'react-web-api/no-leaked-event-listener' : 'warn' ,
@@ -204,7 +204,7 @@ export async function react(
204
204
{
205
205
files : filesTypeAware ,
206
206
ignores : ignoresTypeAware ,
207
- name : 'antfu /react/type-aware-rules' ,
207
+ name : 'coderwyd /react/type-aware-rules' ,
208
208
rules : {
209
209
...typeAwareRules ,
210
210
} ,
0 commit comments