Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit84467c0

Browse files
gabrieldrskaicataldo
authored andcommitted
Docs: fix wrong max-depth example (fixes#11991) (#12358)
Signed-off-by: Gabriel R. Sezefredo <g@briel.dev>
1 parent3642342 commit84467c0

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
functionfoo() {
2626
for (;;) {// Nested 1 deep
27-
letval= ()=> (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
functionfoo() {
4646
for (;;) {// Nested 1 deep
47-
letval= ()=> (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)

[8]ページ先頭

©2009-2026 Movatter.jp