question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`no-unknown-property` doesn't prevent use of unknown properties?

See original GitHub issue

Today React gave me an ā€œunknown propā€ warning:

image In this example, I gave my div element an abc 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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
sjarvacommented, Aug 31, 2022

Phew. This issue looked like ā€œnice and smallā€, but well, was more detective work than I expected šŸ˜…

If anyone has more use cases than <div abc="foo" />, feel free to read through and comment on the PR #3377

1reaction
ryb73commented, Aug 31, 2022

That’s awesome, thanks @sjarva!

Read more comments on GitHub >

github_iconTop Results From Across the Web

no-unknown-property doesn't prevent use of ... - GitHub
Today React gave me an "unknown prop" warning: In this example, I gave my div element an abc attribute, which is obviously invalid...
Read more >
property-no-unknown | Stylelint
Disallow unknown properties. This rule considers properties defined in the CSS Specifications and browser specific properties to be known. This rule ignores:
Read more >
next.js - unknown property key found react/no-unknown-propert
This is an ESLint error, you can disable this specific check. Checkout my eslint config, I disabled this rule. //.eslintrc.js module.exportsĀ ...
Read more >
react/no-unknown-property - Magestore Dev Docs - GitLab
Prevent usage of unknown DOM property (react/no-unknown-property) In JSX all DOM properties and attributes should be camelCased to be consistent with standardĀ ...
Read more >
JS.REACT.NO.UNKNOWN.PROPERTY
Prevent usage of unknown DOM property (react/no-unknown-property) ... In JSX all DOM properties and attributes should be camelCased to be consistent with standardĀ ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found