-
Notifications
You must be signed in to change notification settings - Fork 50k
Fix : Compiler eslint suppression silent skip 35105 #35124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix : Compiler eslint suppression silent skip 35105 #35124
Conversation
|
Thanks for the contribution. Your description says you "Created and ran a validation script that:" but...that script is not here. It is also unnecessary, since we have a testing framework. You (or the LLM you're clearly using) needs to actually run our tests :-) |
josephsavona
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
8eadf4c to
f2860cb
Compare
|
Still need to actually run tests and update fixtures |
907b2d1 to
aaa60c1
Compare
|
Thank you for the feedback. I've addressed the issues you pointed out:
I apologize for the confusion with the initial PR description. I used an LLM to help with the write-up and didn't properly verify its output. The changes now correctly implement the "shorter term fix" we discussed Please let me know if anything else needs to be addressed. |
Summary
This PR fixes #35105 where
eslint-disablecomments cause the React Compiler to skip entire functions, preventing important diagnostics likeincompatible-librarywarnings from being shown.Motivation: When developers add unrelated ESLint suppressions (e.g., for
exhaustive-deps), the compiler would silently skip analyzing the entire function. This meant critical warnings about incompatible APIs would never reach the developer, leading to silent performance issues in production.Solution: Implemented the "shorter term fix" suggested by @josephsavona - in ESLint mode (
noEmit: true), suppressions are now logged as diagnostics but compilation continues to detect other issues. Build mode behavior is unchanged for backward compatibility.Real-World Testing
|