Skip to content

New Rule: svelte/require-each-key #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
baseballyama opened this issue Apr 30, 2023 · 0 comments · Fixed by #473
Closed

New Rule: svelte/require-each-key #459

baseballyama opened this issue Apr 30, 2023 · 0 comments · Fixed by #473
Labels
enhancement New feature or request new rule

Comments

@baseballyama
Copy link
Member

Motivation

This is exactly the same as Vue rule.
https://eslint.vuejs.org/rules/require-v-for-key.html

Description

Require key with {#each} syntax

Examples

<!-- ✓ GOOD -->
{#each items as item (item.id)}
  <li>{item.name} x {item.qty}</li>
{/each}

<!-- ✗ BAD -->
{#each items as item}
  <li>{item.name} x {item.qty}</li>
{/each}

Additional comments

No response

@baseballyama baseballyama added enhancement New feature or request new rule labels Apr 30, 2023
@baseballyama baseballyama changed the title New Rule: svelte/require-v-for-key New Rule: svelte/require-each-key Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant