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: Fixed max-depth example (fixes #119911) #12383

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 5 additions & 4 deletions docs/rules/max-depth.md
Expand Up @@ -40,16 +40,17 @@ 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
if (true) { // Nested 5 deep
}
}
}
};
}
}
}
```
Expand Down