Skip to content

svelte/require-each-key should ignore static arrays #1157

@hyunbinseo

Description

@hyunbinseo

Description

Similar to each blocks without an item, I hope static (inline? readonly?) arrays can be excluded from the each key requirement:

<!-- No error --> {#each { length: 2 }, index} {index} {/each}
<!-- Error: Each block should have a key --> {#each ['a', 'b'] as label} {label} {/each}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions