Last active
August 29, 2015 14:17
-
-
Save rustybailey/b02ba7f576ceff4d0dcc to your computer and use it in GitHub Desktop.
JSCS — JavaScript Code Style (mostly taken from Angular.js with a few tweaks)
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
Show hidden characters
| { | |
| "excludeFiles": ["node_modules/**", "api_docs/**"], | |
| "disallowEmptyBlocks": true, | |
| "disallowKeywordsOnNewLine": ["else"], | |
| "disallowKeywords": ["with"], | |
| "disallowMixedSpacesAndTabs": true, | |
| "disallowNewlineBeforeBlockStatements": true, | |
| "disallowSpaceAfterObjectKeys": true, | |
| "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], | |
| "disallowSpaceBeforeBinaryOperators": [","], | |
| "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], | |
| "disallowSpacesInAnonymousFunctionExpression": { | |
| "beforeOpeningRoundBrace": true | |
| }, | |
| "disallowSpacesInCallExpression": true, | |
| "disallowSpacesInFunctionDeclaration": { | |
| "beforeOpeningRoundBrace": true | |
| }, | |
| "disallowSpacesInNamedFunctionExpression": { | |
| "beforeOpeningRoundBrace": true | |
| }, | |
| "disallowTrailingComma": true, | |
| "disallowTrailingWhitespace": true, | |
| "requireCommaBeforeLineBreak": true, | |
| "requireCurlyBraces": [ | |
| "if", | |
| "else", | |
| "for", | |
| "while", | |
| "do", | |
| "try", | |
| "catch" | |
| ], | |
| "requireSpaceAfterBinaryOperators": ["?", ":", "+", "-", "/", "*", "%", "==", "===", "!=", "!==", ">", ">=", "<", "<=", "&&", "||"], | |
| "requireSpaceBeforeBinaryOperators": ["?", ":", "+", "-", "/", "*", "%", "==", "===", "!=", "!==", ">", ">=", "<", "<=", "&&", "||"], | |
| "requireSpaceBeforeKeywords": [ | |
| "else", | |
| "while", | |
| "catch" | |
| ], | |
| "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], | |
| "requireSpaceBeforeObjectValues": true, | |
| "requireSpaceBetweenArguments": true, | |
| "requireSpacesInConditionalExpression": { | |
| "afterTest": true, | |
| "beforeConsequent": true, | |
| "afterConsequent": true, | |
| "beforeAlternate": true | |
| }, | |
| "requireSpacesInForStatement": true, | |
| "requireSpacesInFunction": { | |
| "beforeOpeningCurlyBrace": true | |
| }, | |
| "requireSpacesInsideObjectBrackets": "all", | |
| "validateParameterSeparator": ", " | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment