diff --git a/docs/rules/max-depth.md b/docs/rules/max-depth.md index 8eed0912fbe..d14129ef136 100644 --- a/docs/rules/max-depth.md +++ b/docs/rules/max-depth.md @@ -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 } } } - }; + } } } ``` @@ -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 } } - }; + } } } ```