Skip to content
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

Add an option to validate to force keyed each instead of allowing both #6482

Closed
dtzxporter opened this issue Jul 1, 2021 · 3 comments
Closed

Comments

@dtzxporter
Copy link

Describe the problem

Vue required that all looped blocks specify a key and it makes it easier to work with and less likely to run into an issue later.

Describe the proposed solution

It would be nice to have a lint option that would error when compiling a each block that isn't keyed.

Alternatives considered

N/A

Importance

would make my life easier

@bluwy
Copy link
Member

bluwy commented Jul 2, 2021

I think this should live in eslint rather than being built into the Svelte compiler. There's a similar closed issue there, and I agree with the consensus that there are cases where keyed each blocks aren't always needed.

@alex-k-exe
Copy link

I think this issue should be labeled as stale

@Conduitry
Copy link
Member

I'm going to close this. I don't think this is something that we should push people towards - nor something that we present as an option for people to push themselves toward.

@Conduitry Conduitry closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants