<template v-for>' cannot be keyed
Vue version
3.2.39
Link to minimal reproduction
Steps to reproduce
The local vscode will report an error, but it does not reappear on Vue SFC Playground.
What is expected?
It is expected that a key can be added to the template
What is actually happening?
When using the for loop on the template, an error is reported when adding a key。 The error content is ‘' cannot be keyed. Place the key on real elements instead’。
System Info
No response
Any additional comments?
'' cannot be keyed. Place the key on real elements instead
it seems your setup is using an eslint rule meant for Vue 2 - in Vue 2, template wrappers in v-for cannot be keyed.
https://eslint.vuejs.org/rules/no-v-for-template-key.html#vue-no-v-for-template-key
In Vue 3, they can (and should), which is covered by this rule:
Please use the repo discussions or our discord server if you need help with propely configuring eslint, this is outside of the scope of a Vue core issue.