File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
apps/website/content/docs/rules
eslint-plugin-react-naming-convention/src
eslint-plugin/src/configs Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ full: true
140140| [ ` context-name ` ] ( ./naming-convention-context-name ) | 1️⃣ | | Enforces context name to be a valid component name with the suffix ` Context ` |
141141| [ ` filename ` ] ( ./naming-convention-filename ) | 0️⃣ | ` ⚙️ ` | Enforces consistent file naming conventions |
142142| [ ` filename-extension ` ] ( ./naming-convention-filename-extension ) | 0️⃣ | ` ⚙️ ` | Enforces consistent use of the JSX file extension |
143- | [ ` use-state ` ] ( ./naming-convention-use-state ) | 0️⃣ | | Enforces destructuring and symmetric naming of ` useState ` hook value and setter |
143+ | [ ` use-state ` ] ( ./naming-convention-use-state ) | 1️⃣ | | Enforces destructuring and symmetric naming of ` useState ` hook value and setter |
144144
145145## Debug Rules
146146
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ export const name = "react-naming-convention/recommended";
44
55export const rules = {
66 "react-naming-convention/context-name" : "warn" ,
7- // "react-naming-convention/use-state": "warn",
7+ "react-naming-convention/use-state" : "warn" ,
88} as const satisfies Record < string , RuleConfig > ;
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ react-naming-convention/use-state
1414@eslint-react/naming-convention/use-state
1515```
1616
17+ ** Presets**
18+
19+ - ` recommended `
20+ - ` recommended-typescript `
21+ - ` recommended-type-checked `
22+
1723## Description
1824
1925Enforces destructuring and symmetric naming of ` useState ` hook value and setter.
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ export const rules = {
1313 ...x . rules ,
1414 ...dom . rules ,
1515 ...webApi . rules ,
16-
16+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect" : "warn" ,
1717 "@eslint-react/naming-convention/context-name" : "warn" ,
18- // "@eslint-react/naming-convention/use-state": "warn",
18+ "@eslint-react/naming-convention/use-state" : "warn" ,
1919} as const satisfies Record < string , RuleConfig > ;
2020
2121export const plugins = {
You can’t perform that action at this time.
0 commit comments