1 # disallow multiple empty lines (no-multiple-empty-lines)
3 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.
7 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.
11 This rule has an object option:
13 * `"max"` (default: `2`) enforces a maximum number of consecutive empty lines.
14 * `"maxEOF"` enforces a maximum number of consecutive empty lines at the end of files.
15 * `"maxBOF"` enforces a maximum number of consecutive empty lines at the beginning of files.
19 Examples of **incorrect** code for this rule with the default `{ "max": 2 }` option:
22 /*eslint no-multiple-empty-lines: "error"*/
31 Examples of **correct** code for this rule with the default `{ "max": 2 }` option:
34 /*eslint no-multiple-empty-lines: "error"*/
44 Examples of **incorrect** code for this rule with the `{ max: 2, maxEOF: 1 }` options:
47 /*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 1 }]*/
57 Examples of **correct** code for this rule with the `{ max: 2, maxEOF: 1 }` options:
60 /*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 1 }]*/
71 Examples of **incorrect** code for this rule with the `{ max: 2, maxBOF: 1 }` options:
74 /*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxBOF": 1 }]*/
83 Examples of **correct** code for this rule with the `{ max: 2, maxBOF: 1 }` options:
86 /*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxBOF": 1}]*/
96 If you do not care about extra blank lines, turn this off.