You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
There is currently no rule to enforce the standard naming convention for useState.
What is the expected behavior?
It would be great to have a rule to enforce the standard naming convention for useState():
const [x, setX] = useState(...)
For example, the rule would consider this an error:
const [x, setFoo] = useState(...)
This would ensure that all useState variables followed the same convention, i.e. ${varName} and set${upperFirstVarName}.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
All versions with hooks
Note
I originally submitted a feature request for eslint-plugin-react: jsx-eslint/eslint-plugin-react#2417. It was suggested that I make the feature request here instead. I'm not sure which plugin would be the more appropriate place for this.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
There is currently no rule to enforce the standard naming convention for
useState
.What is the expected behavior?
It would be great to have a rule to enforce the standard naming convention for
useState()
:For example, the rule would consider this an error:
This would ensure that all useState variables followed the same convention, i.e.
${varName}
andset${upperFirstVarName}
.Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
All versions with hooks
Note
I originally submitted a feature request for eslint-plugin-react: jsx-eslint/eslint-plugin-react#2417. It was suggested that I make the feature request here instead. I'm not sure which plugin would be the more appropriate place for this.
The text was updated successfully, but these errors were encountered: