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

vue/valid-v-for should not trigger on looping through only keys of an object #2733

Open
aibolit opened this issue Apr 4, 2025 · 0 comments

Comments

@aibolit
Copy link

aibolit commented Apr 4, 2025

What rule do you want to change?
vue/valid-v-for

Does this change cause the rule to produce more or fewer warnings?
fewer

How will the change be implemented? (New option, new default behavior, etc.)?
new default behavior

Please provide some example code that this change will affect:

  v-for="(, foo) in bar"

where bar is an Object and I want to loop through only keys

What does the rule currently do for this code?
error Invalid alias '' vue/valid-v-for

What will the rule do after it's changed?
not error out on looping through only keys of an Object

Additional context

@aibolit aibolit changed the title vue/valid-v-for should not trigger on looping through only values of an object vue/valid-v-for should not trigger on looping through only keys of an object Apr 4, 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

1 participant