This is a documentation for version 7.0.0-beta.4.
To check version 6.2.2 go here. To check previous releases go here.

# vue/no-multiple-template-root

disallow adding multiple root nodes to the template

  • ⚙️ This rule is included in all of "plugin:vue/essential", "plugin:vue/strongly-recommended" and "plugin:vue/recommended".

# 📖 Rule Details

This rule checks whether template contains single root element valid for Vue 2.

<!-- The root is text --> <template>Lorem ipsum</template>
Now loading...
<!-- There are multiple root elements --> <template> <div>hello</div> <div>hello</div> </template>
Now loading...
<!-- The root element has `v-for` directives --> <template> <div v-for="item in items"/> </template>
Now loading...
<!-- The root element is `<template>` or `<slot>` --> <template> <slot /> </template>
Now loading...

# 🔧 Options


# 🔍 Implementation