mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-26 04:55:35 +08:00
Changes: - add rule requireSpaceBeforeBlockStatements (require space before brace when opening block statement) - add operators to rule disallowSpaceAfterPrefixUnaryOperators (no space after prefix inc/dec ops) - add rule disallowSpaceBeforePostfixUnaryOperators (no space before postfix inc/dec ops) - add rule disallowSpacesInsideArrayBrackets (array literals no longer padded with spaces) - add rule requireCommaBeforeLineBreak (line can't start with comma token) - add rule validateLineBreaks (require LF linebreaks) Closes #9792
18 lines
812 B
Plaintext
18 lines
812 B
Plaintext
// This is an incomplete TODO list of checks we want to start enforcing
|
|
//
|
|
// The goal is to enable these checks one by one by moving them to .jscs.json along with commits
|
|
// that correct the existing code base issues and make the new check pass.
|
|
|
|
{
|
|
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
|
|
"requireSpaceAfterBinaryOperators": ["?", ":", "+", "-", "/", "*", "%", "==", "===", "!=", "!==", ">", ">=", "<", "<=", "&&", "||"],
|
|
"requireSpaceBeforeBinaryOperators": ["?", ":", "+", "-", "/", "*", "%", "==", "===", "!=", "!==", ">", ">=", "<", "<=", "&&", "||"],
|
|
"disallowImplicitTypeConversion": ["string"],
|
|
"disallowMultipleLineBreaks": true,
|
|
"disallowKeywordsOnNewLine": ["else"],
|
|
"validateJSDoc": {
|
|
"checkParamNames": true,
|
|
"requireParamTypes": true
|
|
}
|
|
}
|