Skip to content

Rule proposal: vue/padding-line-between-blocks #855

Closed
@posva

Description

@posva

Please describe what the rule should do:

Enforce empty lines between blocks (template, script, style, and any other root level block)

What category should the rule belong to?

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<!-- BAD -->
<template>
  <div></div>
</template>
<script>
export default {}
</script>
<custom></custom>
<!-- GOOD -->
<template>
  <div></div>
</template>

<script>
export default {}
</script>

<custom></custom>

Additional context

Having empty lines between blocks improves readability and allows quick navigation per paragraph ({/} in Vim)

similar to https://eslint.org/docs/rules/padding-line-between-statements#rule-details

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions