From 8189d6cc5845dc5f64ac29e062f62e0b914c0c98 Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Tue, 13 May 2014 15:43:44 -0700 Subject: [PATCH] Clarify single newlines at the end of files. --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 536ea8e7..d1513147 100644 --- a/README.md +++ b/README.md @@ -777,7 +777,7 @@ var x = y + 5; ``` - - Place an empty newline at the end of the file. + - End files with a single newline character. ```javascript // bad @@ -786,12 +786,19 @@ })(this); ``` + ```javascript + // bad + (function(global) { + // ...stuff... + })(this);↵ + ↵ + ``` + ```javascript // good (function(global) { // ...stuff... - })(this); - + })(this);↵ ``` - Use indentation when making long method chains.