Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 690 Bytes

no-template-key.md

File metadata and controls

28 lines (18 loc) · 690 Bytes

disallow key attribute on <template> (vue/no-template-key)

  • ⚙️ 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.

👎 Examples of incorrect code for this rule:

<template key="foo"> ... </template>
<template v-bind:key="bar"> ... </template>
<template :key="baz"> ... </template>

👍 Examples of correct code for this rule:

<div key="foo"> ... </div>
<template> ... </template>

🔧 Options

Nothing.