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

Templates in custom blocks are parsed as root elements #1336

Closed
3 tasks done
elevatebart opened this issue Jun 16, 2019 · 6 comments
Closed
3 tasks done

Templates in custom blocks are parsed as root elements #1336

elevatebart opened this issue Jun 16, 2019 · 6 comments
Labels

Comments

@elevatebart
Copy link

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: MacOS
  • Vetur version: 0.21.0
  • VS Code version: 1.35.1

Problem

When using <template> tag in a custom block, the valid-template-root from eslint throws.
When I run eslint I do not see a problem though.

Reproducible Case

<template>
  <div>hello world</div>
</template>

<docs>
` ``vue
<foo>
  <template>
    <div>bonjour</div>
  </template>
</foo>
` ``
</docs>
@octref octref added the bug label Jun 19, 2019
@nicooprat
Copy link

Having this issue too, using https://github.com/vue-styleguidist/vue-styleguidist.

[vue/valid-template-root]
The template root requires exactly one element. eslint-plugin-vue

@lukenofurther
Copy link

I'm also having this issue in VS Code v1.39.0 on Windows

@schjetne
Copy link

schjetne commented Mar 4, 2020

Any progress on this issue? It's a bit distracting having the entire file marked as error when I know there's no error.

@dflock
Copy link

dflock commented Mar 27, 2020

This is happening to me suddenly and is quite annoying. Affects any .vue file with a nested <template> anywhere inside the top level template block:

VSCode version info:

Version: 1.44.0-insider
Commit: e62c4302b0e4f3e28bbcb0f3b6e46bb00e39679c
Date: 2020-03-26T05:42:29.005Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.15.0-66-generic

Vetur version: 0.24.0

image

image

@yapTim
Copy link

yapTim commented May 30, 2020

This issue pops up in my VSCode too. Is this going to get a fix soon?

@ayanoakune
Copy link

I've had this issue over a year. Any progress or workaround for this?

yoyo930021 added a commit that referenced this issue Nov 26, 2020
yoyo930021 added a commit that referenced this issue Nov 26, 2020
This reverts commit 64b845b.
yoyo930021 added a commit that referenced this issue Nov 26, 2020
This reverts commit 327c7d6.
@yoyo930021 yoyo930021 reopened this Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants