vue/no-template-key

disallow key attribute on <template>

  • ⚙️ This rule is included in all of "plugin:vue/essential", "plugin:vue/strongly-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: 12/3/2018, 12:55:00 PM