Created
February 10, 2014 19:43
-
-
Save tbranyen/8922785 to your computer and use it in GitHub Desktop.
My JSCS style configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"maximumLineLength": 80, | |
"validateJSDoc": { | |
"checkParamNames": true, | |
"checkRedundantParams": true, | |
"requireParamTypes": true | |
}, | |
"validateLineBreaks": "LF", | |
"validateQuoteMarks": true, | |
"validateIndentation": 2, | |
"requireCurlyBraces": [ | |
"if", | |
"else", | |
"for", | |
"while", | |
"do", | |
"try", | |
"catch" | |
], | |
"requireSpaceAfterKeywords": [ | |
"if", | |
"else", | |
"for", | |
"while", | |
"do", | |
"switch", | |
"return", | |
"try", | |
"catch" | |
], | |
"requireOperatorBeforeLineBreak": [ | |
"?", | |
"+", | |
"-", | |
"/", | |
"*", | |
"=", | |
"==", | |
"===", | |
"!=", | |
"!==", | |
">", | |
">=", | |
"<", | |
"<=" | |
], | |
"requireSpaceBeforeBinaryOperators": [ | |
"+", | |
"-", | |
"/", | |
"*", | |
"=", | |
"==", | |
"===", | |
"!=", | |
"!==" | |
], | |
"requireSpaceAfterBinaryOperators": [ | |
"+", | |
"-", | |
"/", | |
"*", | |
"=", | |
"==", | |
"===", | |
"!=", | |
"!==" | |
], | |
"requireRightStickedOperators": [ | |
"!" | |
], | |
"requireLeftStickedOperators": [ | |
"," | |
], | |
"requireKeywordsOnNewLine": [ | |
"else", | |
"catch", | |
"while" | |
], | |
"requireSpacesInFunctionExpression": { | |
"beforeOpeningCurlyBrace": true | |
}, | |
"requireParenthesesAroundIIFE": true, | |
"requireCommaBeforeLineBreak": true, | |
"requireCamelCaseOrUpperCaseIdentifiers": true, | |
"requireCapitalizedConstructors": true, | |
"requireDotNotation": true, | |
"disallowLeftStickedOperators": [ | |
"?", | |
"+", | |
"-", | |
"/", | |
"*", | |
"=", | |
"==", | |
"===", | |
"!=", | |
"!==", | |
">", | |
">=", | |
"<", | |
"<=" | |
], | |
"disallowSpaceAfterPrefixUnaryOperators": [ | |
"++", | |
"--", | |
"+", | |
"-", | |
"~", | |
"!" | |
], | |
"disallowRightStickedOperators": [ | |
"?", | |
"+", | |
"/", | |
"*", | |
":", | |
"=", | |
"==", | |
"===", | |
"!=", | |
"!==", | |
">", | |
">=", | |
"<", | |
"<=" | |
], | |
"disallowSpaceBeforePostfixUnaryOperators": [ | |
"++", | |
"--" | |
], | |
"disallowImplicitTypeConversion": [ | |
"numeric", | |
"boolean", | |
"binary", | |
"string" | |
], | |
"disallowKeywords": [ | |
"with" | |
], | |
"disallowMultipleLineStrings": true, | |
"disallowMultipleLineBreaks": true, | |
"disallowEmptyBlocks": true, | |
"disallowSpacesInsideArrayBrackets": true, | |
"disallowSpacesInsideParentheses": true, | |
"disallowQuotedKeysInObjects": true, | |
"disallowSpaceAfterObjectKeys": true, | |
"disallowTrailingWhitespace": true, | |
"disallowMixedSpacesAndTabs": "smart" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@michael-benin-CN just check out the options compared to JSHint. JSCS handles things like braces on different lines, IIFE style, jsdoc style, etc. These aren't things that JSHint can handle as it works with an AST.