You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe what the rule should do:
You can use both v-for="x in xs" and v-for="x of xs". There should be a rule to enforce one of the styles (probably configurable).
What category should the rule belong to?
Enforces code style
Warns about a potential error
Suggests an alternate way of doing something
Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
<!-- "vue/v-for-delimiter-style": ["warn", "in"] -->
<div v-for="x in xs" /><!-- GOOD -->
<div v-for="x of xs" /><!-- BAD -->
<!-- "vue/v-for-delimiter-style": ["warn", "of"] -->
<div v-for="x of xs" /><!-- GOOD -->
<div v-for="x in xs" /><!-- BAD -->
However, looking at the rules of eslint, it seems that the meaning is a little different from the rules that have consistent as a prefix.
I think names like vue/v-for-delimiter or vue/v-for-delimiter-style are good. What do you think?
Please describe what the rule should do:
You can use both
v-for="x in xs"
andv-for="x of xs"
. There should be a rule to enforce one of the styles (probably configurable).What category should the rule belong to?
Provide 2-3 code examples that this rule should warn about:
Additional context
See https://vuejs.org/v2/guide/list.html#Mapping-an-Array-to-Elements-with-v-for:
The text was updated successfully, but these errors were encountered: