---
title: no-multiple-empty-lines
-layout: doc
rule_type: layout
---
var foo = 5;
+
var bar = 3;
```
var foo = 5;
+
var bar = 3;
```
var foo = 5;
+
var bar = 3;
+
```
:::
var foo = 5;
+
var bar = 3;
```
**Incorrect**:
+::: incorrect
+
```js
-1 /*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]*/⏎
-2 ⏎
-3 var foo = 5;⏎
-4 ⏎
-5 ⏎
-6 var bar = 3;⏎
-7 ⏎
-8
+/*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]*/⏎
+⏎
+var foo = 5;⏎
+⏎
+⏎
+var bar = 3;⏎
+⏎
+
```
+:::
+
**Correct**:
+::: correct
+
```js
-1 /*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]*/⏎
-2 ⏎
-3 var foo = 5;⏎
-4 ⏎
-5 ⏎
-6 var bar = 3;⏎
-7
+/*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]*/⏎
+⏎
+var foo = 5;⏎
+⏎
+⏎
+var bar = 3;⏎
+
```
+:::
+
### maxBOF
Examples of **incorrect** code for this rule with the `{ max: 2, maxBOF: 1 }` options:
```js
/*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxBOF": 1 }]*/
+
var foo = 5;
+
var bar = 3;
```
var foo = 5;
+
var bar = 3;
```