Skip to content

Invalid root error on Table root #56

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 27, 2017 · 1 comment · Fixed by #116
Closed

Invalid root error on Table root #56

privatenumber opened this issue Jun 27, 2017 · 1 comment · Fixed by #116

Comments

@privatenumber
Copy link
Contributor

Tell us about your environment

  • ESLint Version: ^3.19.0
  • eslint-plugin-vue Version: ^3.2.0
  • Node Version: v7.9.0

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

<template>
	<table>
		<custom-thead></custom-thead>
	</table>
</template>

What did you expect to happen?
For linting to pass

What actually happened? Please include the actual, raw output from ESLint.
2:2 error The template root requires exactly one element vue/no-invalid-template-root

@mysticatea
Copy link
Member

mysticatea commented Jun 27, 2017

Thank you for the report.

I confirmed it.
Vue.js supports it, but it's invalid syntax as HTML. This plugin is using HTML parser (parse5), so the <custom-thead> is moved to outside of the table.

For now, a workaround is that you use correct HTML:

<template>
	<table>
		<thead is="custom-thead"></thead>
	</table>
</template>

@mysticatea mysticatea added this to the Official release milestone Jun 27, 2017
@mysticatea mysticatea self-assigned this Jul 20, 2017
mysticatea added a commit that referenced this issue Aug 1, 2017
…116)

* Chore: upgrade dependencies
* Fix: several bugs and improve syntax errors (fixes #36, fixes #56, fixes #96)
* add more tests.
filipalacerda pushed a commit to filipalacerda/eslint-plugin-vue that referenced this issue Aug 5, 2017
* master:
  Add rule `vue/require-valid-default-prop`. (vuejs#119)
  3.10.0
  Update readme to 3.10.0
  Chore: remove package-lock.json (vuejs#128)
  Fix: parserService must exist always (fixes vuejs#125) (vuejs#127)
  Add rule `require-render-return`. (vuejs#114)
  3.9.0
  Update package-lock
  Update: options for `no-duplicate-attributes` (fixes vuejs#112)(vuejs#113)
  New: add rule `attribute-hyphenation`. (fixes vuejs#92)(vuejs#95)
  Add namespace check of svg & mathML instead of tag names (vuejs#120)
  ⚠️ Add support for deprecated state in update-rules ⚠️ (vuejs#121)
  Add rules: `no-dupe-keys` and `no-reserved-keys`. (vuejs#88)
  Chore: Improve tests for name-property-casing & improve documentation (vuejs#115)
  New: add `require-prop-types` rule (fixes vuejs#19)(vuejs#85)
  Update: upgrade vue-eslint-parser (fixes vuejs#36, fixes vuejs#56, fixes vuejs#96) (vuejs#116)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment