-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Bug]: no-unknown-property
is missing some valid global properties (event handlers)
#3505
Comments
I will submit a PR for this. Should I be assigned ? |
No need for assignment. the tag, however, is |
Yeah it is a synonym in SVG (see here). Though that is just an example from my use case where I load an image and perform actions after the |
That doesn't sound accurate; |
Note that the PR will need to make sure that |
Is there an existing issue for this?
Description Overview
Brief description
Several global event handler properties that are valid on all HTML elements are being limited to only a few by this rule.
See the "event handler" section in the MDN documentation on global attributes, and the HTML specification on global event handlers here.
Show example of your code (as text format), add images/videos/gifs to help explain example
and/or Link of repo to where issue is occurring
What is happening? / What is the error?
In the above example, the error is
"Invalid property 'onLoad' found on tag 'image', but it is only allowed on: script img, link, picture, iframe, object"
.What command(s) did you run to reproduce issue?
Enabled the rule and the above code will show an error.
Expected Behavior
Brief description
Any global event handler should be able to be defined for any HTML element. (Note that most of these are already in
@types/react
).Show example of code (as text format), add images/videos/gifs to help explain expected behavior
This code should not show an error for defining
onLoad
:eslint-plugin-react version
7.31.11
eslint version
8.28.0
node version
16.14.2
The text was updated successfully, but these errors were encountered: