Browse Source

fix eslint cfg, update jscs cfg, tweak atom cfg

Kyle P Davis 9 years ago
parent
commit
54f3373534
4 changed files with 31 additions and 13 deletions
  1. 1 1
      .eslintrc
  2. 23 12
      .jscsrc
  3. 1 0
      atom/config.cson
  4. 6 0
      install_atom_plugins.sh

+ 1 - 1
.eslintrc

@@ -38,7 +38,7 @@
 
 		// Stylistic Issues
 		"brace-style": [2, "1tbs"],
-		"camelcase": [2, "always"],
+		"camelcase": [2, {"properties": "always"}],
 
 		// ECMAScript 6
 		//

+ 23 - 12
.jscsrc

@@ -12,7 +12,7 @@
   "disallowSpaceBeforeBinaryOperators": [","],
   "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
   "disallowSpacesInFunctionExpression": {
-  	"beforeOpeningRoundBrace": true
+    "beforeOpeningRoundBrace": true
   },
   "disallowSpacesInsideArrayBrackets": true,
   "disallowSpacesInsideObjectBrackets": true,
@@ -26,22 +26,33 @@
   "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
   "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
   "requireSpacesInConditionalExpression": {
-  	"afterTest": true,
-  	"beforeConsequent": true,
-  	"afterConsequent": true,
-  	"beforeAlternate": true
+    "afterTest": true,
+    "beforeConsequent": true,
+    "afterConsequent": true,
+    "beforeAlternate": true
   },
   "requireSpacesInFunctionExpression": {
-  	"beforeOpeningCurlyBrace": true
+    "beforeOpeningCurlyBrace": true
   },
   "requireTrailingComma": {
-  	"ignoreSingleLine": true,
-  	"ignoreSingleValue": true
+    "ignoreSingleLine": true,
+    "ignoreSingleValue": true
   },
   "safeContextKeyword": ["self"],
-  "validateJSDoc": {
-	"checkParamNames": true,
-	"checkRedundantParams": true,
-	"requireParamTypes": true
+  "jsDoc": {
+    "checkAnnotations": {
+      "preset": "jsdoc3"
+    },
+    "checkParamNames": true,
+    "checkRedundantAccess": true,
+    "checkRedundantParams": true,
+    "checkRedundantReturns": true,
+    "enforceExistence": {
+        "allExcept": ["expressions", "exports"]
+    },
+    "leadingUnderscoreAccess": true,
+    "requireParamDescription": true,
+    "requireParamTypes": true,
+    "requireReturnTypes": true
   }
 }

+ 1 - 0
atom/config.cson

@@ -11,6 +11,7 @@
     hideIgnoredNames: true
   linter:
     inlineTooltipInterval: 1000
+    showErrorPanel: false
   "linter-eslint":
     disableWhenNoEslintrcFileInPath: true
   "atom-ternjs": {}

+ 6 - 0
install_atom_plugins.sh

@@ -71,3 +71,9 @@ turbo-javascript
 vim-mode
 EOF
 )
+
+#NOTE: eventually remove this in favor of using eslint exclusively
+# enable jscs jsdoc extension within atom
+gimme node
+cd "$HOME/.atom/"
+npm install jscs-jsdoc