spaced-html-comment
What it does
Section titled “What it does”Reports an HTML comment with no space after <!-- or before --> (<!--text-->).
Why it matters
Section titled “Why it matters”A space keeps the text apart from the marker and reads as text, not as commented-out code.
To fix, write <!-- text -->.
Example
Section titled “Example”...<!--bad--> <!-- ok --> <!---->...<a href="https://x.org" target="_blank" rel="noopener noreferrer">x</a>......<!--bad--> <!-- ok --> <!---->...<a href="https://x.org" target="_blank" rel="noopener noreferrer">x</a>...Configuration
Section titled “Configuration”angular: lint: rules: spaced-html-comment: warn # off (default), warn, errorhtml: lint: rules: spaced-html-comment: warn # off (default), warn, errorsvelte: lint: rules: spaced-html-comment: warn # off (default), warn, errorvue: lint: rules: spaced-html-comment: warn # off (default), warn, errorSuppress one line with sudsy-disable-next-line spaced-html-comment in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| eslint-plugin-svelte | spaced-html-comment |
full |