Skip to main content

attr-req-value

If set, attribute values cannot be empty.

⚠️Boolean attributes such as hidden and checked do not require values, but no attribute may have an equals sign but no value after it, like <div class=></div>, as this is invalid html.

The following patterns are considered violations:

  <button id= ></button>
  <button id=""></button>
  <button id= class="bar" ></button>
  <button class></button>

The following patterns are not considered violations:

  <button class="foo"></button>
  <button disabled></button>