Skip to content

Commit a0a82e4

Browse files
authoredDec 13, 2024··
feat: update @eslint-react/eslint-plugin to ^1.19.0 (#642)
1 parent 20dd434 commit a0a82e4

File tree

3 files changed

+222
-156
lines changed

3 files changed

+222
-156
lines changed
 

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"prepare": "simple-git-hooks"
4040
},
4141
"peerDependencies": {
42-
"@eslint-react/eslint-plugin": "^1.5.8",
42+
"@eslint-react/eslint-plugin": "^1.19.0",
4343
"@prettier/plugin-xml": "^3.4.1",
4444
"@unocss/eslint-plugin": ">=0.50.0",
4545
"astro-eslint-parser": "^1.0.2",
@@ -135,7 +135,7 @@
135135
"devDependencies": {
136136
"@antfu/eslint-config": "workspace:*",
137137
"@antfu/ni": "^0.23.1",
138-
"@eslint-react/eslint-plugin": "^1.17.1",
138+
"@eslint-react/eslint-plugin": "^1.19.0",
139139
"@eslint/config-inspector": "^0.5.6",
140140
"@prettier/plugin-xml": "^3.4.1",
141141
"@stylistic/eslint-plugin-migrate": "^2.11.0",

‎pnpm-lock.yaml

+210-148
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/configs/react.ts

+10-6
Original file line numberDiff line numberDiff line change
@@ -140,25 +140,30 @@ export async function react(
140140

141141
// recommended rules from @eslint-react
142142
'react/ensure-forward-ref-using-ref': 'warn',
143+
'react/jsx-no-duplicate-props': 'warn',
144+
'react/jsx-uses-vars': 'warn',
143145
'react/no-access-state-in-setstate': 'error',
144146
'react/no-array-index-key': 'warn',
145147
'react/no-children-count': 'warn',
146148
'react/no-children-for-each': 'warn',
147149
'react/no-children-map': 'warn',
148150
'react/no-children-only': 'warn',
149-
'react/no-children-prop': 'warn',
150151
'react/no-children-to-array': 'warn',
151152
'react/no-clone-element': 'warn',
152153
'react/no-comment-textnodes': 'warn',
153154
'react/no-component-will-mount': 'error',
154155
'react/no-component-will-receive-props': 'error',
155156
'react/no-component-will-update': 'error',
157+
'react/no-context-provider': 'warn',
156158
'react/no-create-ref': 'error',
159+
'react/no-default-props': 'error',
157160
'react/no-direct-mutation-state': 'error',
158161
'react/no-duplicate-key': 'error',
159-
'react/no-implicit-key': 'error',
162+
'react/no-forward-ref': 'warn',
163+
'react/no-implicit-key': 'warn',
160164
'react/no-missing-key': 'error',
161-
'react/no-nested-components': 'warn',
165+
'react/no-nested-components': 'error',
166+
'react/no-prop-types': 'error',
162167
'react/no-redundant-should-component-update': 'error',
163168
'react/no-set-state-in-component-did-mount': 'warn',
164169
'react/no-set-state-in-component-did-update': 'warn',
@@ -167,11 +172,10 @@ export async function react(
167172
'react/no-unsafe-component-will-mount': 'warn',
168173
'react/no-unsafe-component-will-receive-props': 'warn',
169174
'react/no-unsafe-component-will-update': 'warn',
170-
'react/no-unstable-context-value': 'error',
171-
'react/no-unstable-default-props': 'error',
175+
'react/no-unstable-context-value': 'warn',
176+
'react/no-unstable-default-props': 'warn',
172177
'react/no-unused-class-component-members': 'warn',
173178
'react/no-unused-state': 'warn',
174-
'react/no-useless-fragment': 'warn',
175179
'react/prefer-destructuring-assignment': 'warn',
176180
'react/prefer-shorthand-boolean': 'warn',
177181
'react/prefer-shorthand-fragment': 'warn',

0 commit comments

Comments
 (0)
Please sign in to comment.