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: updated examples of max-lines rule #17898

Merged
merged 1 commit into from Dec 22, 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
20 changes: 10 additions & 10 deletions docs/src/rules/max-lines.md
Expand Up @@ -33,12 +33,12 @@ This rule has a number or object option:

### max

Examples of **incorrect** code for this rule with a max value of `2`:
Examples of **incorrect** code for this rule with a max value of `3`:

::: incorrect

```js
/*eslint max-lines: ["error", 2]*/
/*eslint max-lines: ["error", 3]*/
var a,
b,
c;
Expand All @@ -49,7 +49,7 @@ var a,
::: incorrect

```js
/*eslint max-lines: ["error", 2]*/
/*eslint max-lines: ["error", 3]*/

var a,
b,c;
Expand All @@ -60,20 +60,20 @@ var a,
::: incorrect

```js
/*eslint max-lines: ["error", 2]*/
/*eslint max-lines: ["error", 3]*/
// a comment
var a,
b,c;
```

:::

Examples of **correct** code for this rule with a max value of `2`:
Examples of **correct** code for this rule with a max value of `3`:

::: correct

```js
/*eslint max-lines: ["error", 2]*/
/*eslint max-lines: ["error", 3]*/
var a,
b, c;
```
Expand All @@ -83,7 +83,7 @@ var a,
::: correct

```js
/*eslint max-lines: ["error", 2]*/
/*eslint max-lines: ["error", 3]*/

var a, b, c;
```
Expand All @@ -93,7 +93,7 @@ var a, b, c;
::: correct

```js
/*eslint max-lines: ["error", 2]*/
/*eslint max-lines: ["error", 3]*/
// a comment
var a, b, c;
```
Expand All @@ -107,7 +107,7 @@ Examples of **incorrect** code for this rule with the `{ "skipBlankLines": true
::: incorrect

```js
/*eslint max-lines: ["error", {"max": 2, "skipBlankLines": true}]*/
/*eslint max-lines: ["error", {"max": 3, "skipBlankLines": true}]*/

var a,
b,
Expand All @@ -121,7 +121,7 @@ Examples of **correct** code for this rule with the `{ "skipBlankLines": true }`
::: correct

```js
/*eslint max-lines: ["error", {"max": 2, "skipBlankLines": true}]*/
/*eslint max-lines: ["error", {"max": 3, "skipBlankLines": true}]*/

var a,
b, c;
Expand Down