Closed
Description
Tell us about your environment
- ESLint Version: 4.0.0
- eslint-plugin-vue Version: 3.1.2
- Node Version: 8.0.0
Conditionally empty template root can be acceptable. For example, in a list item component, if an item is empty/undefined, empty template root represents skipping render
.
The reason behind it is that we can encapsulate null check in the component, so we can pass empty value to the component.
vue-hackernews also employs such strategy.
https://github.com/vuejs/vue-hackernews-2.0/blob/master/src/components/Comment.vue#L2
<template>
<li v-if="comment" class="comment">
</li>
</template>