a6cd2c8e62
As we add more javascripts, we need to enforce them. These rules are taken from JP's website directly. Currently there are 15,406 errors, we need to address these first before merging this patch. Those are in subsequent patches. Change-Id: I31d50ead95d502b0463dcd1f378d257b7975e50b Partially-Implements: blueprint jscs-cleanup Ref: https://github.com/johnpapa/angular-styleguide#style-y235
54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
{
|
|
"excludeFiles": [
|
|
"node_modules/**",
|
|
"bower_components/**"
|
|
],
|
|
"requireCurlyBraces": [
|
|
"if",
|
|
"else",
|
|
"for",
|
|
"while",
|
|
"do",
|
|
"try",
|
|
"catch"
|
|
],
|
|
"requireOperatorBeforeLineBreak": true,
|
|
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
|
|
"maximumLineLength": {
|
|
"value": 100,
|
|
"allowComments": true,
|
|
"allowRegex": true
|
|
},
|
|
"validateIndentation": 2,
|
|
"disallowMultipleLineStrings": true,
|
|
"disallowMixedSpacesAndTabs": true,
|
|
"disallowTrailingWhitespace": true,
|
|
"disallowSpaceAfterPrefixUnaryOperators": true,
|
|
"disallowMultipleVarDecl": "exceptUndefined",
|
|
"requireSpaceAfterKeywords": [
|
|
"if",
|
|
"else",
|
|
"for",
|
|
"while",
|
|
"do",
|
|
"switch",
|
|
"return",
|
|
"try",
|
|
"catch"
|
|
],
|
|
"requireSpaceBeforeBinaryOperators": [
|
|
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
|
|
"&=", "|=", "^=", "+=",
|
|
|
|
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
|
|
"|", "^", "&&", "||", "===", "==", ">=",
|
|
"<=", "<", ">", "!=", "!=="
|
|
],
|
|
"requireSpaceAfterBinaryOperators": true,
|
|
"requireSpacesInConditionalExpression": true,
|
|
"requireSpaceBeforeBlockStatements": true,
|
|
"requireLineFeedAtFileEnd": true,
|
|
"disallowMultipleLineBreaks": true,
|
|
"disallowTrailingComma": true,
|
|
"requireParenthesesAroundIIFE": true
|
|
} |