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

fixed max-depth example in documentation #12382

Closed
wants to merge 5 commits 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: 4 additions & 5 deletions docs/rules/max-depth.md
Expand Up @@ -39,17 +39,16 @@ function foo() {
Examples of **correct** code for this rule with the default `{ "max": 4 }` option:

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

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