Vue.js 2.5 / Visual Studio Code editor
I am getting this es-lint warning, how can I get rid of it ?
The question is well answered, but I would like to add an example and a link to the docs:
This structure causes the said error:
{{index}}. {{item.name}}
You can fix it by changing the syntax like this:
{{index}}. {{item.name}}
If your items do not have any unique id field you can just write :key="item"
.
However, for performance reasons your data should have an id field.
https://vuejs.org/v2/guide/list.html#key