# vue/padding-line-between-blocks

require or disallow padding lines between blocks

  • 🔧 The --fix option on the command line 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>
Now loading...
<!-- ✗ BAD --> <template> <div></div> </template> <script> export default {} </script> <style></style>
Now loading...

# 🔧 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>
Now loading...
<!-- ✗ BAD --> <template> <div></div> </template> <script> export default {} </script> <style></style>
Now loading...

# "never"

<!-- ✓ GOOD --> <template> <div></div> </template> <script> export default {} </script> <style></style>
Now loading...
<!-- ✗ BAD --> <template> <div></div> </template> <script> export default {} </script> <style></style>
Now loading...

# 📚 Further Reading

# 🔍 Implementation