Eslint-plugin-vue: Don't require key with v-for on template tags

Created on 21 Jun 2017  路  2Comments  路  Source: vuejs/eslint-plugin-vue

  • ESLint Version: 3.19.0
  • eslint-plugin-vue Version: 3.1.3
  • Node Version: 7.9.0

What did you do? Please include the actual source code causing the issue.


<template>
    <div>
        <template v-for="crumb in crumbArr" :key="crumb">
            <custom-el :crumb="crumb" />
        </template>
    </div>
</template>

What did you expect to happen?
For it to work.

What actually happened? Please include the actual, raw output from ESLint.
No ESLint error. Vue error: <template> cannot be keyed. Place the key on real elements instead.

accepted proposition bug

Most helpful comment

Fixed in v3.4.0 馃殌

All 2 comments

Thank you for the proposal.

You are right, this plugin should catch it.

Fixed in v3.4.0 馃殌

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisvfritz picture chrisvfritz  路  3Comments

KristofMorva picture KristofMorva  路  4Comments

soullivaneuh picture soullivaneuh  路  3Comments

lichnow picture lichnow  路  3Comments

armano2 picture armano2  路  4Comments