Rule suggestion: Prevent invalid HTML DOM element name to be used
See original GitHub issueIt would be nice if invalid DOM element name is detectable. How about this rule?
valid:
<div>{ 'bar' }</div>
invalid:
<foo>{ 'bar' }</foo>
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
How to check if DOM/HTML element attribute name is valid in ...
var element = document.getElementById("myElement"); try{ //attribute name is invalid so it will throw an error element.
Read more ><input>: The Input (Form Input) element - HTML
The <input> HTML element is used to create interactive controls for web-based forms in order to accept data from the user; a wide...
Read more >JavaScript Validation API - W3Schools
checkValidity(), Returns true if an input element contains valid data. setCustomValidity(), Sets the validationMessage property of an input element.
Read more >Autocomplete attribute has valid value | ACT Rule | WAI - W3C
This rule applies to any HTML input , select and textarea element with an autocomplete attribute value that is neither empty ( ""...
Read more >jsx-eslint/eslint-plugin-react: React-specific linting rules for ...
List of supported rules ; no-find-dom-node, Disallow usage of findDOMNode, ☑️ ; no-invalid-html-attribute, Disallow usage of invalid attributes ; no-is-mounted ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@golopot a) only if react itself uses that package, and b) that author’s packages tend to aggressively drop support for older nodes, so it’s unlikely we can use any of them here.
@kamataryo if you can convince react to export them, or extract them to a separate package, that’d be great!
Is it ok to validate html tags by this package html-tags ?