Skip to content

Commit

Permalink
Adding javascript linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
javorszky committed Jan 25, 2016
1 parent c39000d commit 69ba748
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .jscsrc
@@ -0,0 +1,75 @@
{
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"case",
"return",
"try",
"catch",
"function",
"typeof"
],
"requireSpaceBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"requireSpacesInConditionalExpression": true,
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"requireMultipleVarDecl": "onevar",
"requireBlocksOnNewline": 1,
"disallowPaddingNewlinesInBlocks": true,
"disallowEmptyBlocks": true,
"disallowSpacesInsideObjectBrackets": "all",
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterObjectKeys": true,
"requireCommaBeforeLineBreak": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpaceBeforeBinaryOperators": [
","
],
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceAfterBinaryOperators": true,
"disallowKeywords": [ "with" ],
"disallowMultipleLineBreaks": true,
"validateQuoteMarks": "'",
"validateIndentation": 4,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowTrailingComma": true,
"disallowKeywordsOnNewLine": [ "else" ],
"requireLineFeedAtFileEnd": true,
"requireCapitalizedConstructors": true,
"safeContextKeyword": ["self"],
"requireDotNotation": true,
"disallowYodaConditions": true,
"jsDoc": {
"checkParamNames": true,
"checkRedundantParams": true,
"requireParamTypes": true
},
"requireSpaceAfterLineComment": true,
"disallowNewlineBeforeBlockStatements": true,
"maxErrors": -1
}
23 changes: 23 additions & 0 deletions .jshintrc
@@ -0,0 +1,23 @@
{
"node": true,
"browser": false,
"strict": false,
"sub": true,
"eqeqeq": true,
"laxbreak": true,
"bitwise": true,
"curly": true,
"forin": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"plusplus": true,
"regexp": true,
"undef": true,
"unused": true,
"indent": 4,
"predef": [ "-Promise" ]
}

0 comments on commit 69ba748

Please sign in to comment.