Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix examples in no-multiple-empty-lines rule #16835

Merged
merged 2 commits into from Jan 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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