Skip to main content

attr-duplication

Warns that attributes were duplicated in one element. Capital letters and lower-case letters are not distinguished.

There must never be two or more attributes on the same start tag whose names are an ASCII case-insensitive match for each other.

Cite: HTML Living Standard 13.1.2.3 Attributes

❌ Examples of incorrect code for this rule

<div data-attr="value" data-Attr="db"></div>

✅ Examples of correct code for this rule

<div data-attr="value" data-Attr2="db"></div>

Interface

{
"attr-duplication": boolean
}

Default Severity

error