-
-
Notifications
You must be signed in to change notification settings - Fork 18
[docs] Improve the error message of naming-convention/use-state
#980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I also get a warning for this code: const [liveQueryLive, setLiveQuery] = useState(searchQuery ?? ''); |
And this one: const [options, setOptionsState] = useState<ItemPickerState>(); |
The rule in the issue title should be |
The main purpose of this rule is to enforce symmetric naming between |
naming-convention/use-state
I'm not sure if this is the same issue @Rel1cx but I have code that also gets flagged that seems like it might be similar. I have a custom hook called
gets flagged with |
Describe the bug
This triggers "An useState call is not destructured into value + setter pair @eslint-react/naming-convention/use-state" but it shouldn't.
Reproduction
Expected behavior
No error.
Platform and versions
Stack trace
Additional context
No response
The text was updated successfully, but these errors were encountered: