Javier Muñoz Tous
Javier Muñoz Tous
Same issue here. I'm getting a redirect loop as well
I think we could use a couple of heuristics like checking `is_react_component` (checks if function starts with Uppercase like react components do) and checking if the file is `jsx`/`tsx`. Could...
> Please be aware we already have such a heuristic: > > https://github.com/biomejs/biome/blob/d3dacc995501f3bc7c9195390b49b921b2b5f14c/crates/biome_js_analyze/src/react/hooks.rs#L132 > > I suppose this is not used by the rule yet… Yep, that's the function I...
Investigating this I noticed that eslint approach is not perfect either:
A similar case was fixed for some jest functions that start with “use” https://github.com/biomejs/biome/blob/d3dacc995501f3bc7c9195390b49b921b2b5f14c/crates/biome_js_analyze/src/react/hooks.rs#L156 I tried adding other heuristics, like checking that the root caller is a react component or...
@dyc3 I think your suggestion is actually a good workaround. I opened a Draft PR with this change. I need to find a way to run the snapshots simulating an...