Skip to content

Commit

Permalink
docs: Fix examples in no-multiple-empty-lines rule (#16835)
Browse files Browse the repository at this point in the history
* docs: Fix examples in no-multiple-empty-lines rule

* chore: Add missing `::: correct` and `::: incorrect`
  • Loading branch information
jonz94 committed Jan 28, 2023
1 parent 9c7cfe3 commit 17f4be2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/src/rules/no-multiple-empty-lines.md
Expand Up @@ -31,6 +31,7 @@ Examples of **incorrect** code for this rule with the default `{ "max": 2 }` opt
var foo = 5;



var bar = 3;
```

Expand All @@ -45,6 +46,7 @@ Examples of **correct** code for this rule with the default `{ "max": 2 }` optio

var foo = 5;


var bar = 3;
```

Expand All @@ -61,8 +63,10 @@ Examples of **incorrect** code for this rule with the `{ max: 2, maxEOF: 0 }` op

var foo = 5;


var bar = 3;


```

:::
Expand All @@ -76,6 +80,7 @@ Examples of **correct** code for this rule with the `{ max: 2, maxEOF: 0 }` opti

var foo = 5;


var bar = 3;
```

Expand All @@ -85,6 +90,8 @@ var bar = 3;

**Incorrect**:

::: incorrect

```js
1 /*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]*/
2
Expand All @@ -96,8 +103,12 @@ var bar = 3;
8
```

:::

**Correct**:

::: correct

```js
1 /*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]*/
2
Expand All @@ -108,6 +119,8 @@ var bar = 3;
7
```

:::

### maxBOF

Examples of **incorrect** code for this rule with the `{ max: 2, maxBOF: 1 }` options:
Expand All @@ -117,8 +130,10 @@ Examples of **incorrect** code for this rule with the `{ max: 2, maxBOF: 1 }` op
```js
/*eslint no-multiple-empty-lines: ["error", { "max": 2, "maxBOF": 1 }]*/


var foo = 5;


var bar = 3;
```

Expand All @@ -133,6 +148,7 @@ Examples of **correct** code for this rule with the `{ max: 2, maxBOF: 1 }` opti

var foo = 5;


var bar = 3;
```

Expand Down

0 comments on commit 17f4be2

Please sign in to comment.