From c3dad3a85ec19c2c466fd444ee63383d0e2d313e Mon Sep 17 00:00:00 2001 From: Navnita Nandakumar Date: Mon, 7 Oct 2019 12:00:55 +1100 Subject: [PATCH 1/2] fixed max-depth example in documentation --- docs/rules/max-depth.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/rules/max-depth.md b/docs/rules/max-depth.md index 8eed0912fbe..4c2091a93e6 100644 --- a/docs/rules/max-depth.md +++ b/docs/rules/max-depth.md @@ -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 } } - }; + } } } ``` From abb1f6b8b4d28dddd0ad92255b99fe703dfe989c Mon Sep 17 00:00:00 2001 From: Navnita Nandakumar Date: Mon, 7 Oct 2019 12:00:55 +1100 Subject: [PATCH 2/2] Docs: fixed max-depth example in documentation --- docs/rules/max-depth.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/rules/max-depth.md b/docs/rules/max-depth.md index 8eed0912fbe..4c2091a93e6 100644 --- a/docs/rules/max-depth.md +++ b/docs/rules/max-depth.md @@ -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 } } - }; + } } } ```