Skip to content

Instantly share code, notes, and snippets.

@joaocunha
Created December 1, 2014 01:30
Show Gist options
  • Save joaocunha/620aead3047387142611 to your computer and use it in GitHub Desktop.
Save joaocunha/620aead3047387142611 to your computer and use it in GitHub Desktop.
My defaults for JSCS
{
"fileExtensions": [
".js"
],
"disallowDanglingUnderscores": {
"allExcept": ["_exception"]
},
"disallowEmptyBlocks": true,
"disallowFunctionDeclarations": true,
"disallowKeywords": [ "with", "eval" ],
"disallowKeywordsOnNewLine": [ "else" ],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": [
"++",
"--",
"+",
"-",
"~",
"!"
],
"disallowSpaceBeforePostfixUnaryOperators": [
"++",
"--"
],
"disallowSpacesInCallExpression": true,
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideObjectBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"disallowYodaConditions": true,
"maximumLineLength": 120,
"requireAnonymousFunctions": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": true,
"requireLineFeedAtFileEnd": true,
"requirePaddingNewLinesInObjects": true,
"requireParenthesesAroundIIFE": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return"
],
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"validateIndentation": 4,
"validateLineBreaks": "LF",
"validateParameterSeparator": ", ",
"validateQuoteMarks": {
"escape": true,
"mark": "'"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment