Skip to content
On this page

vue/no-root-v-if

disallow v-if directives on root element

This rule reports template roots with v-if. Rendering of the whole component could be made conditional in the parent component (with a v-if there) instead.

📖 Rule Details

This rule reports the template root in the following cases:

Now loading...

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-vue v9.12.0

🔍 Implementation