eslint-plugin-vue icon indicating copy to clipboard operation
eslint-plugin-vue copied to clipboard

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

Open aibolit opened this issue 8 months ago • 0 comments

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 avatar Apr 04 '25 13:04 aibolit