JS.VUE.V.FOR.DELIMITER.STYLE
Enforce 'v-for' directive's delimiter style
Rule Details
This rule enforces which delimiter (in
or of
) should be used in v-for
directives.
{'vue/v-for-delimiter-style': ['error']}
Copy
<template>
<!-- GOOD -->
<div v-for="x in xs" />
<!-- BAD -->
<div v-for="x of xs" />
</template>
Options
Default is set to in
.
Copy
{
"vue/v-for-delimiter-style": ["error", "in" | "of"]
}
"in"
(default) ... requires usingin
."of"
... requires usingof
.
"of"
{'vue/v-for-delimiter-style': ['error', 'of']}
Copy
<template>
<!-- GOOD -->
<div v-for="x of xs" />
<!-- BAD -->
<div v-for="x in xs" />
</template>
Further Reading
- Guide - List Rendering (https://v3.vuejs.org/guide/list.html)