Skip to content

Commit

Permalink
add js linter rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Panagiotis Papadatis committed Apr 6, 2017
1 parent 4a745bd commit 0737aff
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"validateIndentation": 4,
"validateQuoteMarks": "'",
"requireSpacesInForStatement": true,
"requireParenthesesAroundIIFE": true,
"requireLineFeedAtFileEnd": true,
"requireBlocksOnNewline": true,
"disallowPaddingNewlinesInBlocks": true,
"disallowEmptyBlocks": true,
"disallowSpaceAfterObjectKeys": true,
"requireSpaceBeforeObjectValues": true,
"requireCommaBeforeLineBreak": true,
"requireSpaceBeforeBinaryOperators": [
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
"&=", "|=", "^=", "+=",

"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
"|", "^", "&&", "||", "===", "==", ">=",
"<=", "<", ">", "!=", "!=="
],
"requireSpaceAfterBinaryOperators": true,
"disallowTrailingComma": true,
"requireDotNotation": true,
"disallowUnusedVariables": true,
"disallowUnusedParams": true,
"disallowYodaConditions": true,
"disallowNewlineBeforeBlockStatements": true,
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"requireSpaceAfterKeywords": [
"do",
"for",
"if",
"else",
"switch",
"case",
"try",
"catch",
"void",
"while",
"with",
"return",
"typeof",
"function"
],
"disallowKeywordsOnNewLine": [
"else",
"catch"
],
"disallowMultipleLineBreaks": true,
"disallowSpacesInsideObjectBrackets": "all",
"disallowSpacesInsideArrayBrackets": "all"
}

0 comments on commit 0737aff

Please sign in to comment.