-
Notifications
You must be signed in to change notification settings - Fork 463
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
JSX component error message improvements #7038
Conversation
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.
This is awesome! A big improvement!
Super valuable indeed! |
Something else regarding props highlighting: Currently, as seen in the third screenshot, for a non-existing prop, the prop value is highlighted, even though it is actually the prop name that is incorrect. This behavior has already confused me quite a few times. Would it be possible to highlight the prop name instead? |
Actually same in the first screenshot - the problem is not really the value, but the duplicate prop name. |
I've tried adjusting the loc used but it seems like something else is making that behavior not work right now. Maybe something in how we parse JSX. Anyway, I'll merge this now with the current behavior and we can do a follow up later on trying to adjust the locs/track down why it doesn't work. |
This tries to improve the error messages around JSX components by specializing them, instead of having them be the generic record error messages. It's a pre-cursor to improving the interface file mismatch error messages for components.
Some examples:



Part of #6975