vue/padding-line-between-tags
eslint-plugin-vue
Safe autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/padding-line-between-tags": "error",
},
},
]; <div></div>
<div>
</div>
<div /><div />
</div>
</template> <div v-if="foo" />
<div v-else />
</div>
</template><div></div>
<div>
</div>
<div />
<div /><span>This is a single-line tag</span>
<span>This is a single-line tag</span><div>
This is a multi-line tag
</div>Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/padding-line-between-tags
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/padding-line-between-tags": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce consistent line breaks after opening and before closing braces in <template>
Require or disallow padding lines in component definition