Skip to content

vue/require-v-for-key ​

Add a unique :key attribute to every v-for iteration element

PropertyValue
CategoryCorrectness
Default Severityerror
Confidencehigh
FixableNo
Engineeslint-template
Sincev1.0.0
Frameworksvue, nuxt

Why it matters ​

Add a unique :key attribute to every v-for iteration element

How to fix ​

Review the finding and update the code according to best practices below.

Agent Guidance ​

Add a unique, stable :key to the element that has v-for (an id from the data, not the index).


Rule source: vue/require-v-for-key

Released under the MIT License.