Open CalebJamesStevens opened 2 years ago
Please let us just have access to the ESLint config, so we can fix issues like this ourselves!
BTW I think it's even worse than just React namespace, it doesn't allow anything of the pattern /use[A-Z][A-z]*/
at all, I couldn't use useProgram
but I'm pretty sure that's not a standard React hook.
🐛 bug report
Preflight Checklist
Description of the problem
Eslint throw error for variable names that are the same as React namespaces in a vanilla js project.
For example.
I have a vanilla project and can't use the name 'useState' for a variable because I can't declare react hooks at a top level. I recieved this error
How has this issue affected you? What are you trying to accomplish?
i'm trying to just play with code, not using react
To Reproduce
create a vanilla js project. in index.js create a function called
useState
. Try to call that function. Recieve eslint error.Link to sandbox: link
Your Environment