From 84467c07461cc47ee43807ba9014e13700473c5c Mon Sep 17 00:00:00 2001 From: Gabriel R Sezefredo Date: Mon, 7 Oct 2019 22:39:04 -0300 Subject: [PATCH] Docs: fix wrong max-depth example (fixes #11991) (#12358) Signed-off-by: Gabriel R. Sezefredo --- docs/rules/max-depth.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/rules/max-depth.md b/docs/rules/max-depth.md index 8eed0912fbe..b853d026713 100644 --- a/docs/rules/max-depth.md +++ b/docs/rules/max-depth.md @@ -24,14 +24,14 @@ Examples of **incorrect** code for this rule with the default `{ "max": 4 }` opt 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 } } } - }; + } } } ``` @@ -44,12 +44,12 @@ Examples of **correct** code for this rule with the default `{ "max": 4 }` optio 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 } } - }; + } } } ```