vue/no-v-for-template-key-on-child
disallow key of
<template v-for>
placed on child elements
- ⚙️ This rule is included in all of
"plugin:vue/vue3-essential"
,*.configs["flat/essential"]
,"plugin:vue/vue3-strongly-recommended"
,*.configs["flat/strongly-recommended"]
,"plugin:vue/vue3-recommended"
and*.configs["flat/recommended"]
.
📖 Rule Details
This rule reports the key of the <template v-for>
placed on the child elements.
In Vue.js 3.x, with the support for fragments, the <template v-for>
key can be placed on the <template>
tag.
See Migration Guide - key
attribute > With <template v-for>
for more details.
Note
This rule is targeted at Vue.js 3.x. If you are using Vue.js 2.x, enable the vue/no-v-for-template-key rule instead. Don't enable both rules together; they are conflicting.
🔧 Options
Nothing.
👫 Related Rules
📚 Further Reading
🚀 Version
This rule was introduced in eslint-plugin-vue v7.0.0