瀏覽代碼

add default configs for various JS tools that I use

Kyle P Davis 10 年之前
父節點
當前提交
ac65efbb9d
共有 3 個文件被更改,包括 83 次插入0 次删除
  1. 45 0
      .jscsrc
  2. 32 0
      .jshintrc
  3. 6 0
      .node-inspectorrc

+ 45 - 0
.jscsrc

@@ -0,0 +1,45 @@
+{
+  "disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
+  "disallowKeywords": ["with"],
+  "disallowKeywordsOnNewLine": ["else", "catch", "finally"],
+  "disallowMixedSpacesAndTabs": true,
+  "disallowNewlineBeforeBlockStatements": true,
+  "disallowQuotedKeysInObjects": true,
+  "disallowSpaceAfterObjectKeys": true,
+  "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+  "disallowSpaceBeforeBinaryOperators": [","],
+  "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+  "disallowSpacesInFunctionExpression": {
+  	"beforeOpeningRoundBrace": true
+  },
+  "disallowSpacesInsideArrayBrackets": true,
+  "disallowSpacesInsideObjectBrackets": true,
+  "disallowSpacesInsideParentheses": true,
+  "disallowTrailingWhitespace": true,
+  "disallowYodaConditions": true,
+  "requireBlocksOnNewline": true,
+  "requireCurlyBraces": ["for", "while", "do", "try", "catch"],
+  "requireLineFeedAtFileEnd": true,
+  "requireSpaceAfterBinaryOperators": [",", "+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+  "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
+  "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+  "requireSpacesInConditionalExpression": {
+  	"afterTest": true,
+  	"beforeConsequent": true,
+  	"afterConsequent": true,
+  	"beforeAlternate": true
+  },
+  "requireSpacesInFunctionExpression": {
+  	"beforeOpeningCurlyBrace": true
+  },
+  "requireTrailingComma": {
+  	"ignoreSingleLine": true,
+  	"ignoreSingleValue": true
+  },
+  "safeContextKeyword": ["self"],
+  "validateJSDoc": {
+	"checkParamNames": true,
+	"checkRedundantParams": true,
+	"requireParamTypes": true
+  }
+}

+ 32 - 0
.jshintrc

@@ -0,0 +1,32 @@
+{
+
+	"camelcase": true,
+	"curly": false,
+	"eqeqeq": true,
+	"forin": true,
+	"immed": true,
+	"latedef": true,
+	"newcap": true,
+	"noarg": true,
+	"noempty": true,
+	"nonbsp": true,
+	"nonew": true,
+	"quotmark": true,
+	"undef": true,
+	"unused": "vars",
+	"strict": false,
+	"trailing": true,
+	"maxparams": 11,
+	"maxdepth": 7,
+	"maxstatements": 42,
+	"maxcomplexity": 13,
+	"maxlen": 140,
+
+	"boss": true,
+	"expr": true,
+	"globalstrict": true,
+
+	"node": true,
+	"devel": false
+
+}

+ 6 - 0
.node-inspectorrc

@@ -0,0 +1,6 @@
+{
+	"preload": false,
+	"save-live-edit": true,
+	"stack-trace-limit": 50,
+	"web-port": "54321"
+}