no-conditional-comment
Angular templatesHTMLVue / SvelteVue / Sveltesuspiciousno fixdefault: offhtml/html-validate-recommended
What it does
Section titled “What it does”Reports an Internet Explorer conditional comment (<!--[if IE]>).
Why it matters
Section titled “Why it matters”Only Internet Explorer 9 and older read the content; every other browser sees a comment, so it is code that no current browser runs.
To fix, remove the comment, or replace it with feature detection or CSS.
Example
Section titled “Example”<!DOCTYPE html><title>x</title><!--[if IE]><p>old</p><![endif]--><!-- fine -->Configuration
Section titled “Configuration”angular: lint: rules: no-conditional-comment: warn # off (default), warn, errorhtml: lint: rules: no-conditional-comment: warn # off (default), warn, errorsvelte: lint: rules: no-conditional-comment: warn # off (default), warn, errorvue: lint: rules: no-conditional-comment: warn # off (default), warn, errorEnabled by the presets: html/html-validate-recommended.
Suppress one line with sudsy-disable-next-line no-conditional-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 |
|---|---|---|
| html-validate | no-conditional-comment |
full |