webhintio / hint

πŸ’‘ A hinting engine for the web
https://webhint.io/
Apache License 2.0
3.63k stars 685 forks source link

[Hint] Check for stray / early-terminating HTML tags (in head or other places). #2723

Open TheLarkInn opened 5 years ago

TheLarkInn commented 5 years ago

πŸš€ Hint request

Detect early terminating / stray tags. Was speaking with Harry Roberts on Twitter who said he was evaluating performance for a website and whil evaluating found a Stray end tag. Maybe we can detect this!

https://twitter.com/csswizardry/status/1153289573348401153?s=20

image

What do you want webhint to test? Is there a stray tag in the DOM. Are you willing to work on this? Not currently I don’t have the bandwidth. ## What should be tested exactly? Explain what and how things should be tested. If you don't know, don't worry and leave this empty. ## Relevant links Any links to documentation, discussions, etc. relevant to the proposed hint that motivated you to open this issue.
antross commented 5 years ago

Thanks @TheLarkInn! This sub-category of validation may be interesting.

While webhint already does a full validation pass as part of hint-html-checker when run from the website or the CLI, this has to call out to html5.validator.nu (which is implemented in Python) so it doesn't get used in bundled scenarios like the new browser extension.

I've yet to find a pure JS validator we could easily include in a bundle, so perhaps something focused on this specific scenario would be targeted enough to be worth implementing independently.