React Compiler lint rules #5290
Replies: 8 comments 4 replies
-
|
To echo my feedback from #3 (reply in thread), I want to request that in the short term, we could have an option for the |
Beta Was this translation helpful? Give feedback.
-
|
If it is helpful, the source code seems to be here (licensed under MIT): https://github.com/facebook/react/tree/main/compiler/packages/eslint-plugin-react-compiler |
Beta Was this translation helpful? Give feedback.
-
|
I'm not sure how BiomeJS was developed, but I’ll assume its rules were heavily inspired by ESLint. Based on the React documentation, it looks like |
Beta Was this translation helpful? Give feedback.
-
|
I have also created a task for a new This was always bad practice in React, and with the React Compiler it seems to have become a hard error. |
Beta Was this translation helpful? Give feedback.
-
|
@GRA0007 have you tried using eslint plugin for react hooks please? I set it up on localhost, the error is still present in eslint as well. if you could maybe setup a simple example with eslint where this is NOT showing? Will be very helpful. |
Beta Was this translation helpful? Give feedback.
-
|
FWIW eslint-plugin-react-compiler is the only thing preventing me from ditching eslint. |
Beta Was this translation helpful? Give feedback.
-
|
Are there any plans for this in the biome roadmap? I've had a great experience with biome so far but this is the first roadblock I've come across. I'd love to begin migrating my project to use the compiler but it would be a pain to rely only on the build time compiler errors. Thank you biome team ❤️ |
Beta Was this translation helpful? Give feedback.
-
|
Bumping for visibility. Any updates on this? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The React Compiler has a corresponding ESLint plugin for reporting issues diagnosed by the compiler.
Unfortunately, as far as I'm aware, it is not documented what issues are reported by the plugin, so it is not even clear what Biome would need to implement exactly. The best target would be the Babel plugin, but it would be complex to port to Rust and it is itself still in beta and quite possibly a moving target.
Note that Biome does have lint rules to enforce the rules of hooks.
Suggestions and helpful pointers are appreciated in this thread!
Beta Was this translation helpful? Give feedback.
All reactions