-
Notifications
You must be signed in to change notification settings - Fork 15
/
.jscsrc
96 lines (93 loc) · 3.59 KB
/
.jscsrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
// Disallow rules
"disallowEmptyBlocks": true,
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowMultipleSpaces": {"allowEOLComments": true},
"disallowMultipleVarDecl": true,
"disallowNamedUnassignedFunctions": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowPaddingNewlinesInBlocks": true,
"disallowPaddingNewlinesInBlocks": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowSpaceAfterObjectKeys": true,
"requireCommaBeforeLineBreak": true,
"requireOperatorBeforeLineBreak": [ "?", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<=" ],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforeComma": true,
"disallowSpaceBeforeSemicolon": true,
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInCallExpression": true,
"disallowSpacesInFunction": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowTrailingWhitespace": true,
"disallowTrailingComma": true,
"requireKeywordsOnNewLine": ["else"],
"disallowYodaConditions": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowYodaConditions": true,
// jsdoc
"jsDoc": {
"checkAnnotations": true,
"checkParamNames": true,
"requireParamTypes": true,
"checkRedundantParams": true,
"checkReturnTypes": true,
"checkRedundantReturns": true,
"requireReturnTypes": true,
"leadingUnderscoreAccess": true,
"disallowNewlineAfterDescription": true,
"requireParamDescription": true
},
// requires
"requireBlocksOnNewline": 1,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": [ "if", "else", "for", "while", "do" , "try", "catch"],
"requireKeywordsOnNewLine": ["else"],
"requireLineBreakAfterVariableAssignment": true,
"requireLineFeedAtFileEnd": true,
"requireOperatorBeforeLineBreak": true,
"requirePaddingNewLinesBeforeExport": true,
"requireSemicolons": true,
// disabled until autofix supported: https://github.com/jscs-dev/node-jscs/issues/1250
//"requireSpaceAfterLineComment": true,
"requireSpaceAfterKeywords": [ "if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceAfterBinaryOperators": [",", "+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceBeforeBlockStatements": true,
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceBeforeBlockStatements": 1,
"requireSpaceBeforeKeywords": [
"else",
"while",
"catch"
],
"requireSpaceBeforeObjectValues": true,
"requireSpaceBetweenArguments": true,
"requireSpacesInForStatement": true,
"requireSpacesInConditionalExpression": true,
"requireSpacesInForStatement": true,
"requireSpacesInsideObjectBrackets": {
"allExcept": [ "}", ")" ]
},
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireDotNotation": { "allExcept": [ "keywords" ] },
// validates
"validateIndentation": "\t",
"validateParameterSeparator": ", "
}