JS.VUE.VALID.TEMPLATE.ROOT

Enforce valid template root

This rule checks whether every template root is valid.

Rule Details

This rule reports the template root in the following cases:

{'vue/valid-template-root': ['error']}

Copy
<!-- There is no root element -->
<template></template>

{'vue/valid-template-root': ['error']}

Copy
<!-- The root with src attribute is not empty -->
<template src="foo.html"><div></div></template>

Options

Nothing.

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/