# svelte/require-each-key
require keyed
{#each}
block
- âī¸ This rule is included in
"plugin:svelte/recommended"
.
# đ Rule Details
This rule reports {#each}
block without key
<script>
/* eslint svelte/require-each-key: "error" */
</script>
<!-- â GOOD -->
{#each things as thing (thing.id)}
<Thing name={thing.name} />
{/each}
<!-- â BAD -->
Each block should have a key (svelte/require-each-key){#each things as thing}
<Thing name={thing.name} />
{/each}
# đ§ Options
Nothing.
# đĢ Related Rules
# đ Further Reading
# đ Version
This rule was introduced in eslint-plugin-svelte v2.28.0