Created
March 16, 2015 18:55
-
-
Save kj786/6d5ee37afb4da85aa6b4 to your computer and use it in GitHub Desktop.
JSCS Styleguide validation according to Google
This file contains 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
{ | |
"requireCurlyBraces": [ | |
"if", | |
"else", | |
"for", | |
"while", | |
"do", | |
"try", | |
"catch" | |
], | |
"requireOperatorBeforeLineBreak": true, | |
"requireCamelCaseOrUpperCaseIdentifiers": true, | |
"maximumLineLength": { | |
"value": 80, | |
"allowComments": true, | |
"allowRegex": true | |
}, | |
"validateIndentation": 2, | |
"validateQuoteMarks": "'", | |
"disallowMultipleLineStrings": true, | |
"disallowMixedSpacesAndTabs": true, | |
"disallowTrailingWhitespace": true, | |
"disallowSpaceAfterPrefixUnaryOperators": true, | |
"disallowMultipleVarDecl": true, | |
"disallowKeywordsOnNewLine": ["else"], | |
"requireSpaceAfterKeywords": [ | |
"if", | |
"else", | |
"for", | |
"while", | |
"do", | |
"switch", | |
"return", | |
"try", | |
"catch" | |
], | |
"requireSpaceBeforeBinaryOperators": [ | |
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", | |
"&=", "|=", "^=", "+=", | |
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&", | |
"|", "^", "&&", "||", "===", "==", ">=", | |
"<=", "<", ">", "!=", "!==" | |
], | |
"requireSpaceAfterBinaryOperators": true, | |
"requireSpacesInConditionalExpression": true, | |
"requireSpaceBeforeBlockStatements": true, | |
"requireSpacesInForStatement": true, | |
"requireLineFeedAtFileEnd": true, | |
"requireSpacesInFunctionExpression": { | |
"beforeOpeningCurlyBrace": true | |
}, | |
"disallowSpacesInAnonymousFunctionExpression": { | |
"beforeOpeningRoundBrace": true | |
}, | |
"disallowSpacesInsideObjectBrackets": "all", | |
"disallowSpacesInsideArrayBrackets": "all", | |
"disallowSpacesInsideParentheses": true, | |
"disallowMultipleLineBreaks": true, | |
"disallowNewlineBeforeBlockStatements": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment