# san/no-multiple-template-root

disallow adding multiple root nodes to the template

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

# 📖 Rule Details

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

<!-- 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 `s-for` directives --> <template> <div s-for="item in items"/> </template>
Now loading...
<!-- The root element is `<template>` or `<slot>` --> <template> <slot /> </template>
Now loading...

# 🔧 Options

Nothing.

# 🔍 Implementation

Last Updated: 10/26/2021, 7:23:11 AM