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

Warning when :for attribute is used, without a key attribute #22

Open
michielvandergeest opened this issue Apr 17, 2024 · 1 comment
Open
Assignees

Comments

@michielvandergeest
Copy link
Contributor

As I'm writing up documentation on the for-loop functionality I'm realising that it's very important (in most cases) to add a key attribute when using the :for attribute.

It would be nice if the VS code plugin can display a warning when the key attribute is omitted. It's not 100% required (for example when creating a static for-loop, with no changes ever).

Ideally it would also be nice to detect wether the index is used in the key attribute, and display a warning about it (i.e. the index is not a useful value to use in the key attribute)

@uguraslan
Copy link
Collaborator

Ideally it would also be nice to detect wether the index is used in the key attribute, and display a warning about it (i.e. the index is not a useful value to use in the key attribute)

A warning will be added with v1.0.0 (#23)

It would be nice if the VS code plugin can display a warning when the key attribute is omitted. It's not 100% required

Now displaying a warning for that is also possible but we need to find a way to remove the warning where it is not required.

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

2 participants