Note

This is a documentation for version 7.0.0-alpha.0.
To check version 6.2.2 go here. To check previous releases go here.

# vue/no-template-key

disallow key attribute on <template>

  • ⚙️ This rule is included in all of "plugin:vue/vue3-essential", "plugin:vue/essential", "plugin:vue/vue3-strongly-recommended", "plugin:vue/strongly-recommended", "plugin:vue/vue3-recommended" and "plugin:vue/recommended".

Vue.js disallows key attribute on <template> elements.

# 📖 Rule Details

This rule reports the <template> elements which have key attribute.

<template> <!-- ✓ GOOD --> <div key="foo"> ... </div> <template> ... </template> <!-- ✗ BAD --> <template key="foo"> ... </template> <template v-bind:key="bar"> ... </template> <template :key="baz"> ... </template> </template>
Now loading...

# 🔧 Options

Nothing.

# 📚 Further reading

# 🔍 Implementation

Last Updated: 3/14/2020, 9:09:30 AM