Closed lkraav closed 4 years ago
I had a quick look at the issue you referenced.
It seems pretty odd, your error is stating that a hr
is a non-void element.. but a hr
is a void element so that makes no sense.
maybe its a bug in parse5 or we need to update our copy of parse5 🤔 works in ASTExplorer too.
Any news about this issue?
I don't think parse5 cares about the tag name or makes a distinction between void elements and non-void elements. So I doubt this is a bug with parse5. I think the linter needs to keep a list of void elements and not error on a missing closing tag or trailing slash.
Tyvm, this successfully fixes my repo's linting annoyance :+1:
Prettier insists on auto-fixing everything towards
<hr />
-like, and this gets us into a fight withlit/no-invalid-html
Prettier issue has a lengthy discussion that seems to be going towards no action, so I was wondering what this ESLint ruleset thinks about this situation. Should
lit/no-invalid-html
ruleset maybe be amended for a whitelist of standard HTML5 tags, or...?