From 33a9e3336ca29893249f6a55873cdd0c9c15efa4 Mon Sep 17 00:00:00 2001 From: Christopher McCulloh Date: Thu, 23 Oct 2014 16:22:16 -0400 Subject: [PATCH 1/2] (always-use-braces) default to using braces, but, allow for not in some instances without encouraging it --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 16b08d5..ebc8164 100644 --- a/README.md +++ b/README.md @@ -529,7 +529,7 @@ return false; } - // bad + // good function () { return false; } // good From 9a8a67f0795eae157f1c6b1caf104a343a435e49 Mon Sep 17 00:00:00 2001 From: Christopher McCulloh Date: Thu, 23 Oct 2014 16:28:04 -0400 Subject: [PATCH 2/2] (always-use-braces) default to using braces, but, allow for not in some instances without encouraging it --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ebc8164..934a503 100644 --- a/README.md +++ b/README.md @@ -521,9 +521,6 @@ if (test) return false; - // good (only for very simple statements and early function return) - if (test) return false; - // good if (test) { return false; @@ -536,6 +533,9 @@ function () { return false; } + + // acceptable (only for very simple statements and early function return) + if (test) return false; ``` **[[⬆]](#TOC)**