Skip to content

Instantly share code, notes, and snippets.

@camsjams

camsjams/.jscsrc Secret

Created February 22, 2017 19:44
Show Gist options
  • Save camsjams/c75f6a0b632892e41c1b2af3e828e135 to your computer and use it in GitHub Desktop.
Save camsjams/c75f6a0b632892e41c1b2af3e828e135 to your computer and use it in GitHub Desktop.
jscs config based on eslint (for legacy editor support)
{
"excludeFiles": [
"node_modules",
"coverage"
],
"fileExtensions": [".js", ".jsx"],
"esnext": true,
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"disallowEmptyBlocks": true,
"disallowSpacesInCallExpression": true,
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpaceBeforeBinaryOperators": [
","
],
"disallowMixedSpacesAndTabs": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"disallowYodaConditions": true,
"disallowKeywords": [
"with"
],
"disallowKeywordsOnNewLine": [
"else"
],
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true,
"disallowSpaceBeforeComma": true,
"disallowSpaceBeforeSemicolon": true,
"requireSpaceAfterComma": true,
"requireSpaceBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"requireSpacesInConditionalExpression": true,
"requireBlocksOnNewline": 1,
"requireCommaBeforeLineBreak": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceAfterBinaryOperators": true,
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
"requireLineFeedAtFileEnd": true,
"requireCapitalizedConstructors": true,
"requireDotNotation": true,
"requireSpacesInForStatement": true,
"requireSpaceBetweenArguments": true,
"requireCurlyBraces": [
"do"
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"case",
"return",
"try",
"catch",
"typeof"
],
"requirePaddingNewLinesAfterBlocks": {
"allExcept": [
"inCallExpressions",
"inArrayExpressions",
"inProperties"
]
},
"requirePaddingNewLinesBeforeLineComments": {
"allExcept": "firstAfterCurly"
},
"maximumLineLength": 120,
"requireSemicolons": true,
"safeContextKeyword": "self",
"validateLineBreaks": "LF",
"validateQuoteMarks": {
"mark": "'",
"escape": true
},
"validateIndentation": "\t",
"requireArrowFunctions": true,
"requireTemplateStrings": true,
"requireParenthesesAroundArrowParam": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment