💼 This rule is enabled in the 📋 template-lint-migration config.
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.
This rule forbids the following:
<template><div id='id-00'></div><div id='id-00'></div></template>This rule allows the following:
<template><div id={{this.divId}}></div></template><template><div id='concat-{{this.divId}}'></div></template><template>
<MyComponent as |inputProperties|>
<Input id={{inputProperties.id}} />
<div id={{inputProperties.abc}} />
</MyComponent>
<MyComponent as |inputProperties|>
<Input id={{inputProperties.id}} />
</MyComponent>
</template>For best results, it is recommended to generate id attribute values when they are needed, to ensure that they are not duplicates.