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
Create a functional component with a name such as ÄndraVärde that starts with a non english upper case letter
Run the linter
The current behavior
Sample error:
23:20 error React Hook "useSelectedState" is called in function "ÄndraVärde" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use" react-hooks/rules-of-hooks
The expected behavior
The linting should allow non english component names, React does.
The problem
Version 5.0.0 included the changes made in #25162 which modified the following method:
React version: [email protected]
Steps To Reproduce
ÄndraVärde
that starts with a non english upper case letterThe current behavior
Sample error:
The expected behavior
The linting should allow non english component names, React does.
The problem
Version 5.0.0 included the changes made in #25162 which modified the following method:
react/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
Lines 43 to 50 in e137890
This code only allows english upper case letters
A-Z
which is not enough.Proposed solution
Use
.toUpperCase()
and compare the result:This should work with a lot more languages at least.
The text was updated successfully, but these errors were encountered: