Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 644 Bytes

no-duplicate-id.md

File metadata and controls

31 lines (19 loc) · 644 Bytes

no-duplicate-id

Valid HTML requires that id attribute values are unique.

This rule does a basic check to ensure that id attribute values are not the same.

Examples

This rule forbids the following:

<div id="id-00"></div><div id="id-00"></div>

This rule allows the following:

<div id={{this.divId}}></div>
<div id="concat-{{this.divId}}"></div>

Migration

For best results, it is recommended to generate id attribute values when they are needed, to ensure that they are not duplicates.

References