Note

This is a documentation for version 7.0.0-beta.2.
To check version 6.2.2 go here. To check previous releases go here.

# 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