Requires a specific style of attribute quoting

Rule ID:
attr-quotes
Category:
Style
Standards:
-

HTML allows different styles for quoting attributes:

This rule unifies which styles are allowed.

Rule details

Examples of incorrect code for this rule:

<p class='foo'></p>
error: Attribute "class" used ' instead of expected " (attr-quotes) at inline:1:4:
> 1 | <p class='foo'></p>
    |    ^^^^^^^^^^^


1 error found.

Examples of correct code for this rule:

<p class="foo"></p>

Options

This rule takes an optional object:

{
  "style": "auto",
  "unquoted": false
}

Style

Unquoted

If false unquoted attributes is disallowed (default).

Version history