Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

e9d97e1 · May 10, 2023

History

History
55 lines (36 loc) · 1.17 KB

require-each-key.md

File metadata and controls

55 lines (36 loc) · 1.17 KB
pageClass sidebarDepth title description
rule-details
0
svelte/require-each-key
require keyed `{#each}` block

svelte/require-each-key

require keyed {#each} block

  • This rule has not been released yet.

📖 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 things as thing}
  <Thing name={thing.name} />
{/each}

🔧 Options

Nothing.

👫 Related Rules

📚 Further Reading

🔍 Implementation