Skip to content

Commit

Permalink
Docs: Fix incorrect example for max-depth rule (eslint#11991)
Browse files Browse the repository at this point in the history
  • Loading branch information
SungGyeong Bae committed Jul 16, 2019
1 parent 4448261 commit ec8ea74
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/rules/max-depth.md
Expand Up @@ -20,18 +20,17 @@ Examples of **incorrect** code for this rule with the default `{ "max": 4 }` opt

```js
/*eslint max-depth: ["error", 4]*/
/*eslint-env es6*/

function foo() {
for (;;) { // Nested 1 deep
let val = () => (param) => { // Nested 2 deep
while (true) { // Nested 2 deep
if (true) { // Nested 3 deep
if (true) { // Nested 4 deep
if (true) { // Nested 5 deep
}
}
}
};
}
}
}
```
Expand All @@ -40,16 +39,15 @@ Examples of **correct** code for this rule with the default `{ "max": 4 }` optio

```js
/*eslint max-depth: ["error", 4]*/
/*eslint-env es6*/

function foo() {
for (;;) { // Nested 1 deep
let val = () => (param) => { // Nested 2 deep
if (true) { // Nested 3 deep
while (true) { // Nested 2 deep
if (true) { // Nested 3 deep
if (true) { // Nested 4 deep
}
}
};
}
}
}
```
Expand Down

0 comments on commit ec8ea74

Please sign in to comment.