Skip to content

Don't require key with v-for on template tags #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
privatenumber opened this issue Jun 21, 2017 · 2 comments
Closed

Don't require key with v-for on template tags #43

privatenumber opened this issue Jun 21, 2017 · 2 comments

Comments

@privatenumber
Copy link
Contributor

privatenumber commented Jun 21, 2017

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

@mysticatea
Copy link
Member

Thank you for the proposal.

You are right, this plugin should catch it.

@mysticatea mysticatea added the bug label Jun 22, 2017
mysticatea added a commit that referenced this issue Jun 22, 2017
@michalsnik michalsnik added this to the Official release milestone Jun 26, 2017
mysticatea added a commit that referenced this issue Jun 27, 2017
michalsnik pushed a commit that referenced this issue Jun 30, 2017
* Update: add check for `key` attribute of child of templates (refs #43)

* New: no-template-key (fixes #43)

* replace emoji by github notation
@michalsnik
Copy link
Member

Fixed in v3.4.0 🚀

armano2 pushed a commit to armano2/eslint-plugin-vue that referenced this issue Jul 13, 2017
* Update: add check for `key` attribute of child of templates (refs vuejs#43)

* New: no-template-key (fixes vuejs#43)

* replace emoji by github notation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants