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
I think perhaps I'm seeing the converse of #26: I use PascalCase for my constants, and the plugin considers erroneously them to be components. An example that will trigger the rule:
exportconstantSomeConstant=42// ✗ [eslint] Fast refresh only works when a file only exports components ... exportfunctionsomeUtility(){returnSomeConstant}
If I change that the capitalization to screaming snake, it passes:
OK, I guess PascalCase is not the preferred convention here. But is there any global setting I'm missing that could easily prevent such constants from being flagged? (Using eslint-disable-next-line is more distracting than it's worth; if I have to do that I'll probably just switch to screaming snake, but that's not my preference.)
The text was updated successfully, but these errors were encountered:
This was probably buggy before 0.4.4, but now having PascalCase variable being init with something else than function or a function call should not be flagged as a React component.
I had a file like this and the const RETRIES was being flagged, but renaming createRoutes to fit the component naming convention (e.g. to AppRoutes) fixed it.
I think perhaps I'm seeing the converse of #26: I use PascalCase for my constants, and the plugin considers erroneously them to be components. An example that will trigger the rule:
If I change that the capitalization to screaming snake, it passes:
OK, I guess PascalCase is not the preferred convention here. But is there any global setting I'm missing that could easily prevent such constants from being flagged? (Using
eslint-disable-next-line
is more distracting than it's worth; if I have to do that I'll probably just switch to screaming snake, but that's not my preference.)The text was updated successfully, but these errors were encountered: