Skip to content

Commit 84467c0

Browse files
gabrieldrskaicataldo
authored andcommitted
Docs: fix wrong max-depth example (fixes #11991) (#12358)
Signed-off-by: Gabriel R. Sezefredo <[email protected]>
1 parent 3642342 commit 84467c0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/rules/max-depth.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Examples of **incorrect** code for this rule with the default `{ "max": 4 }` opt
2424

2525
function foo() {
2626
for (;;) { // Nested 1 deep
27-
let val = () => (param) => { // Nested 2 deep
27+
while (true) { // Nested 2 deep
2828
if (true) { // Nested 3 deep
2929
if (true) { // Nested 4 deep
3030
if (true) { // Nested 5 deep
3131
}
3232
}
3333
}
34-
};
34+
}
3535
}
3636
}
3737
```
@@ -44,12 +44,12 @@ Examples of **correct** code for this rule with the default `{ "max": 4 }` optio
4444

4545
function foo() {
4646
for (;;) { // Nested 1 deep
47-
let val = () => (param) => { // Nested 2 deep
48-
if (true) { // Nested 3 deep
47+
while (true) { // Nested 2 deep
48+
if (true) { // Nested 3 deep
4949
if (true) { // Nested 4 deep
5050
}
5151
}
52-
};
52+
}
5353
}
5454
}
5555
```

0 commit comments

Comments
 (0)