attr-spacing
What it does
Section titled “What it does”Reports a quoted attribute value that is directly followed by the next attribute, with no white space between them (class="a"id="b").
Why it matters
Section titled “Why it matters”Parsers accept it with an error, and many tools read it differently. Two attributes stuck together are hard to read and are usually a missing space from an edit.
To fix, put a space between the attributes.
Example
Section titled “Example”...<head><title>x</title></head><body>...<a href="x"class="y">t</a>...<p style="display: none">ok</p>...Configuration
Section titled “Configuration”angular: lint: rules: attr-spacing: warn # off (default), warn, errorhtml: lint: rules: attr-spacing: warn # off (default), warn, errorsvelte: lint: rules: attr-spacing: warn # off (default), warn, errorvue: lint: rules: attr-spacing: warn # off (default), warn, errorEnabled by the presets: html/html-validate-standard.
Suppress one line with sudsy-disable-next-line attr-spacing 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 | attr-spacing |
full |