Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 526 Bytes

no-invalid-html.md

File metadata and controls

25 lines (16 loc) · 526 Bytes

Disallows invalid HTML in templates (no-invalid-html)

Templates should all contain valid HTML, if any, as it is expected to be parsed as part of rendering.

Rule Details

This rule disallows invalid HTML in templates.

The following patterns are considered warnings:

html`<x-foo />`;
html`<x-foo invalid"attribute></x-foo>`;

The following patterns are not warnings:

html`<x-foo bar=${true}></x-foo>`;

When Not To Use It

If you don't care about invalid HTML, then you will not need this rule.