vue/no-v-for-template-key
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-v-for-template-key": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
<template v-for="item in list" :key="item.id">
<div />
</template>
</template><template v-for="item in list">
<div :key="item.id" />
</template>Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/no-v-for-template-key
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-v-for-template-key": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce consistent line breaks after opening and before closing braces in <template>
Disallow unsupported Vue.js syntax on the specified version
Require or disallow newlines between sibling tags in template