Skip to content

Instantly share code, notes, and snippets.

@yannickcr
Created June 2, 2014 00:13
Show Gist options
  • Save yannickcr/22e506fc43e85f798567 to your computer and use it in GitHub Desktop.
Save yannickcr/22e506fc43e85f798567 to your computer and use it in GitHub Desktop.
.jscsrc
{
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch",
"case",
"default"
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"requireSpaceBeforeBlockStatements" : true,
"requireParenthesesAroundIIFE" : true,
"requireSpacesInFunctionExpression" : {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInFunctionExpression" : {
"beforeOpeningRoundBrace": true
},
"disallowMultipleVarDecl" : true,
"disallowPaddingNewlinesInBlocks" : true,
"requireBlocksOnNewline" : true,
"disallowEmptyBlocks" : true,
"disallowSpacesInsideObjectBrackets" : true,
"disallowSpacesInsideArrayBrackets" : true,
"disallowSpacesInsideParentheses" : true,
"disallowQuotedKeysInObjects" : "allButReserved",
"requireCommaBeforeLineBreak" : true,
"requireOperatorBeforeLineBreak": [
"?",
"+",
"-",
"/",
"*",
"=",
"==",
"===",
"!=",
"!==",
">",
">=",
"<",
"<="
],
"disallowLeftStickedOperators": [
"?",
"+",
"-",
"/",
"*",
"=",
"==",
"===",
"!=",
"!==",
">",
">=",
"<",
"<="
],
"requireRightStickedOperators" : ["!"],
"disallowRightStickedOperators": [
"?",
"+",
"/",
"*",
":",
"=",
"==",
"===",
"!=",
"!==",
">",
">=",
"<",
"<="
],
"requireLeftStickedOperators" : [",", ";"],
"disallowSpaceAfterPrefixUnaryOperators" : ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators" : ["++", "--"],
"requireSpaceBeforeBinaryOperators" : ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceAfterBinaryOperators" : ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"disallowKeywords" : ["with"],
"disallowMultipleLineStrings" : true,
"disallowMultipleLineBreaks" : true,
"validateLineBreaks" : "LF",
"validateQuoteMarks" : "'",
"validateIndentation" : 2,
"disallowMixedSpacesAndTabs" : true,
"disallowTrailingWhitespace" : true,
"disallowTrailingComma" : true,
"disallowKeywordsOnNewLine" : ["else"],
"requireLineFeedAtFileEnd" : true,
"maximumLineLength" : 120,
"requireCapitalizedConstructors" : true,
"requireDotNotation" : true,
"disallowYodaConditions" : true,
"excludeFiles" : [
"node_modules/**"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment