vue/no-root-v-if
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-root-v-if": "error",
},
},
];<template>
<div v-if="visible">Content</div>
</template><template>
<div v-if="visible">Content</div>
<div v-else>Fallback</div>
</template>Examples from the Biome documentation.
vue/no-root-v-if
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-root-v-if": "error",
},
},
];Oxlint does not have this rule.
nursery/noVueRootVIf
nursery · since 2.6.0
{
"linter": {
"rules": {
"nursery": {
"noVueRootVIf": "error"
}
}
}
}Disallow unused emit declarations
Enforce or forbid the use of the scoped and module attributes in SFC top level style tags
Enforce use of defineOptions instead of default export
Enforce using v-model instead of :prop/@update:prop pair
Disallow importing Vue compiler macros