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:
export const SomeConstant = 42 // ✗ [eslint] Fast refresh only works when a file only exports components ...
export function someUtility() { return SomeConstant }
If I change that the capitalization to screaming snake, it passes:
export const SOME_CONSTANT = 42 // ✓
export function someUtility() { return SOME_CONSTANT }
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.)
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-lineis 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.)