Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 946 Bytes

no-multiple-empty-lines.md

File metadata and controls

43 lines (27 loc) · 946 Bytes

no-multiple-empty-lines

👗 The extends: 'stylistic' property in a configuration file enables this rule.

Some developers prefer to have multiple blank lines removed, while others feel that it helps improve readability. Whitespace is useful for separating logical sections of code, but excess whitespace takes up more of the screen.

This rule aims to reduce the scrolling required when reading through your code. It will warn when the maximum amount of empty lines has been exceeded.

Examples

This rule forbids the following:

<div>foo</div>


<div>bar</div>

This rule allows the following:

<div>foo</div>

<div>bar</div>
<div>foo</div>
<div>bar</div>

Configuration

  • object -- containing the following properties:
    • number -- max -- (default: 1) enforces a maximum number of consecutive empty lines.

References