From 8efcb89983744d4584980adabec22e7faa9e1fcb Mon Sep 17 00:00:00 2001 From: sillero Date: Wed, 4 Dec 2013 17:03:51 +0000 Subject: [PATCH 1/5] codio commit --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 75c818cbd6..0e0e8b256a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Airbnb JavaScript Style Guide() { +# My personal JavaScript Style Guide() { -*A mostly reasonable approach to JavaScript* +Based on [Airbnb JavaScript Style Guide() {](https://github.com/airbnb/javascript) ## Table of Contents @@ -727,12 +727,12 @@ ## Whitespace - - Use soft tabs set to 2 spaces + - Use soft tabs set to 4 spaces ```javascript // bad function() { - ∙∙∙∙var name; + ∙∙var name; } // bad @@ -742,7 +742,7 @@ // good function() { - ∙∙var name; + ∙∙∙∙var name; } ``` - Place 1 space before the leading brace. From 3419cc9af4a830d4f2d49cd2c824df2dedde44dd Mon Sep 17 00:00:00 2001 From: sillero Date: Wed, 4 Dec 2013 17:21:00 +0000 Subject: [PATCH 2/5] 4 spaces --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0e0e8b256a..5831ad79e2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # My personal JavaScript Style Guide() { -Based on [Airbnb JavaScript Style Guide() {](https://github.com/airbnb/javascript) - +Based on [Airbnb JavaScript Style Guide() {](https://github.com/airbnb/javascript) +The main difference is "Use soft tabs set to 2 4 spaces" ## Table of Contents From ed072f9a98ee40ea68fa7bf3e1a7f722d501f3d4 Mon Sep 17 00:00:00 2001 From: sillero Date: Wed, 4 Dec 2013 17:22:48 +0000 Subject: [PATCH 3/5] bad coders --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5831ad79e2..4690b764c6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # My personal JavaScript Style Guide() { Based on [Airbnb JavaScript Style Guide() {](https://github.com/airbnb/javascript) -The main difference is "Use soft tabs set to 2 4 spaces" +The main difference is "Use soft tabs set to 2 4 spaces", which, in my view, exposes bad coders (serial indenters) ## Table of Contents From fc525eeb9763408e9d1bb0d97a5928c08f876d81 Mon Sep 17 00:00:00 2001 From: sillero Date: Wed, 4 Dec 2013 17:26:02 +0000 Subject: [PATCH 4/5] sublimelinter settings spaces --- linters/SublimeLinter/SublimeLinter.sublime-settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linters/SublimeLinter/SublimeLinter.sublime-settings b/linters/SublimeLinter/SublimeLinter.sublime-settings index 5c4e5dd382..5b77c72884 100644 --- a/linters/SublimeLinter/SublimeLinter.sublime-settings +++ b/linters/SublimeLinter/SublimeLinter.sublime-settings @@ -44,7 +44,7 @@ "eqnull": true, // Enforce tab width of 2 spaces. - "indent": 2, + "indent": 4, // Prohibit use of a variable before it is defined. "latedef": true, From 0a3b454444fb2f522267ddb73991725a2368d950 Mon Sep 17 00:00:00 2001 From: sillero Date: Wed, 4 Dec 2013 17:33:40 +0000 Subject: [PATCH 5/5] jshint settings --- .../SublimeLinter.sublime-settings | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/linters/SublimeLinter/SublimeLinter.sublime-settings b/linters/SublimeLinter/SublimeLinter.sublime-settings index 5b77c72884..9020c9ca88 100644 --- a/linters/SublimeLinter/SublimeLinter.sublime-settings +++ b/linters/SublimeLinter/SublimeLinter.sublime-settings @@ -32,11 +32,15 @@ * ENFORCING OPTIONS * ================= */ - + + "boss": true, + // Force all variable names to use either camelCase style or UPPER_CASE // with underscores. "camelcase": true, - + + curly: true, + // Prohibit use of == and != in favor of === and !==. "eqeqeq": true, @@ -45,15 +49,21 @@ // Enforce tab width of 2 spaces. "indent": 4, - + + "immed": true, + // Prohibit use of a variable before it is defined. - "latedef": true, + "latedef": "nofunc", // Require capitalized names for constructor functions. "newcap": true, + + "noarg": true, // Enforce use of single quotation marks for strings. "quotmark": "single", + + "sub": true, // Prohibit trailing whitespace. "trailing": true, @@ -62,7 +72,7 @@ "undef": true, // Warn when variables are defined but never used. - "unused": true, + "unused": "vars", // Enforce line length to 80 characters "maxlen": 80