-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
no-unknown-property
doesn't prevent use of unknown properties?
#757
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
Comments
Were you using spread props, or was it an explicit prop directly on a DOM element? |
It was explicit. |
I definitely think |
was this fixed at some point? I can confirm it doesn't work as expected :/ |
@mvirbicianskas no, but a PR would be welcome. |
Phew. This issue looked like "nice and small", but well, was more detective work than I expected 😅 If anyone has more use cases than |
That's awesome, thanks @sjarva! |
Today React gave me an "unknown prop" warning:
In this example, I gave my
div
element anabc
attribute, which is obviously invalid HTML.I was surprised that my linter didn't pick up on this. Looking at the documentation, the name and description of the
no-unknown-property
rule lead me to believe that this should be caught, but that doesn't appear to be the case.So, I suppose this is a feature request: add a rule to catch invalid DOM properties.
The text was updated successfully, but these errors were encountered: