Skip to content
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

Require Key in template, but not allowed #1954

Closed
Jona898 opened this issue Aug 24, 2020 · 1 comment
Closed

Require Key in template, but not allowed #1954

Jona898 opened this issue Aug 24, 2020 · 1 comment

Comments

@Jona898
Copy link

Jona898 commented Aug 24, 2020

Version

3.0.0-rc.7

Reproduction link

https://github.com/Jona898/vue-next---Bug-require-key-in-template

Steps to reproduce

Let the Code run. The Error that there is no :key for this template should happen on Compile time.

What is expected?

The template got replaced with each html tag inside the temlate.
This expected behavior worked fine in vue@3.0.0-0

What is actually happening?

The Message sais you should place the key into the template tag.
If you place the key into the template tag there is an error that you are not allowed to place a key tag there.
If you replace the template tag with a div and the key tag into the div everything works fine, but the extra div is renderd into the dom.


I have two elements, which i want to render for each iteration without any suraunding structure.
It worked fine until i upgraded the packages and was suprised this changed.

@yyx990803
Copy link
Member

yyx990803 commented Aug 24, 2020

This is a known issue in eslint-plugin-vue: vuejs/eslint-plugin-vue#1279
Will require a new release of it for this to be fixed. For now, you can disable the related rules in your eslint config.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants