no-raw-gt
What it does
Section titled “What it does”Reports a > in text (a > b). A raw < in text is a syntax error.
Why it matters
Section titled “Why it matters”A > is valid HTML and renders as written. Some tools and templates still treat a lone > as the end of a tag, so escaping it avoids surprises.
To fix, write >.
Example
Section titled “Example”<!doctype html><title>t</title><p><strong>></strong></p><p>a > b & &</p>...<p>onetwo > three</p><script>if (a > b) {}</script><style>a > b {}</style>Configuration
Section titled “Configuration”angular: lint: rules: no-raw-gt: warn # off (default), warn, errorhtml: lint: rules: no-raw-gt: warn # off (default), warn, errorsvelte: lint: rules: no-raw-gt: warn # off (default), warn, errorvue: lint: rules: no-raw-gt: warn # off (default), warn, errorEnabled by the presets: html/htmlhint.
Suppress one line with sudsy-disable-next-line no-raw-gt in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| htmlhint | spec-char-escape |
partial | a raw < in text is the parser’s error, a > the rule no-raw-gt |