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.

Rule suggestion: Prevent invalid HTML DOM element name to be used

See original GitHub issue

It 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:open
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ljharbcommented, Mar 20, 2019

@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!

0reactions
golopotcommented, Mar 20, 2019

Is it ok to validate html tags by this package html-tags ?

Read more comments on GitHub >

github_iconTop 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 >

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