Skip to main content

no-boolean-attr-value

info

🔧 This rule supports auto-fix with the --fix option.

Warn when it specified any value to the boolean attribute.

info

Not included in any preset: the empty string and the name of the attribute (required="required") are conforming values of a boolean attribute, so leaving the value out is purely a project style preference. A value that is neither is not conforming, and no-invalid-attr-value reports it (HTML Standard).

❌ Examples of incorrect code for this rule

<input type="text" required="required" />

✅ Examples of correct code for this rule

<input type="text" required />

Interface​

{
"no-boolean-attr-value": boolean
}

Default Severity​

warning