# vue/padding-line-between-blocks
require or disallow padding lines between blocks
- 🔧 The
--fix
option on the command line (opens new window) can automatically fix some of the problems reported by this rule.
# 📖 Rule Details
This rule requires or disallows blank lines between the given 2 blocks. Properly blank lines help developers to understand the code.
<!-- ✓ GOOD -->
<template>
<div></div>
</template>
<script>
export default {}
</script>
<style></style>
<!-- ✗ BAD -->
<template>
<div></div>
</template>
<script>
export default {}
</script>
<style></style>
# 🔧 Options
{
"vue/padding-line-between-blocks": ["error", "always" | "never"]
}
"always"
(default) ... Requires one or more blank lines. Note it does not count lines that comments exist as blank lines."never"
... Disallows blank lines.
# "always"
(default)
<!-- ✓ GOOD -->
<template>
<div></div>
</template>
<script>
export default {}
</script>
<style></style>
<!-- ✗ BAD -->
<template>
<div></div>
</template>
<script>
export default {}
</script>
<style></style>
# "never"
<!-- ✓ GOOD -->
<template>
<div></div>
</template>
<script>
export default {}
</script>
<style></style>
<!-- ✗ BAD -->
<template>
<div></div>
</template>
<script>
export default {}
</script>
<style></style>
# 📚 Further Reading
# 🚀 Version
This rule was introduced in eslint-plugin-vue v6.2.0