-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.jscsrc
109 lines (109 loc) · 3.25 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
97
98
99
100
101
102
103
104
105
106
107
108
109
{
// Function rules
"requireFunctionDeclarations": true,
"requireAnonymousFunctions": {"allExcept": ["declarations"]},
"disallowSpacesInFunction": {
"beforeOpeningRoundBrace": true
},
"requireSpacesInFunction": {
"beforeOpeningCurlyBrace": true
},
"validateAlignedFunctionParameters": true,
// Comments
"requireCapitalizedComments": true,
"requireSpaceAfterLineComment": true,
// New lines
"disallowPaddingNewlinesInBlocks": true,
"requireCommaBeforeLineBreak": true,
"requireKeywordsOnNewLine": ["else"],
// Spacing
"disallowMixedSpacesAndTabs": true,
"disallowMultipleSpaces": true,
"disallowMultipleLineBreaks": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceAfterBinaryOperators": true,
"disallowSpaceBeforeComma": true,
"requireSpaceAfterComma": {"allExcept": ["trailing"]},
"requireSpaceAfterKeywords": [
"do",
"else",
"case",
"try",
"void",
"return",
"typeof"
],
"disallowSpaceAfterKeywords": [
"if",
"for",
"while",
"do",
"switch"
],
"requireSpaceBeforeObjectValues": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"requireSpaceBeforeBlockStatements": true,
"disallowSpaceBeforeSemicolon": true,
"disallowSpacesInCallExpression": true,
"requireSpacesInConditionalExpression": true,
"requireSpacesInForStatement": true,
"disallowSpacesInsideBrackets": true,
"disallowSpacesInsideObjectBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingWhitespace": true,
"disallowTabs": true,
"requireLineFeedAtFileEnd": true,
// Naming
"requireCamelCaseOrUpperCaseIdentifiers": {
"ignoreProperties": true
},
// Object Literals
"requireObjectKeysOnNewLine": true,
"requireObjectKeysOnNewLine": {
"allExcept": ["sameLine"]
},
"disallowQuotedKeysInObjects": true,
"requireDotNotation": true,
"disallowTrailingComma": true,
// ES6 Features
"requireShorthandArrowFunctions": true,
"disallowParenthesesAroundArrowParam": true,
"disallowIdenticalDestructuringNames": true,
"requireSpread": true,
"requireNumericLiterals": true,
"requireTemplateStrings": {"allExcept": ["stringConcatenation"]},
"requireEnhancedObjectLiterals": true,
// Quotes, Semicolons, Braces, IIFE
"requireSemicolons": true,
"validateQuoteMarks": {"mark": "'", "escape": true},
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch",
"switch"
],
"disallowCurlyBraces": ["case", "default"],
"requireParenthesesAroundIIFE": true,
// Validation
"validateIndentation": 2,
"validateLineBreaks": {"character": "LF", "reportOncePerFile": true},
"validateNewlineAfterArrayElements": {"ignoreBrackets": true},
"disallowYodaConditions": true,
"disallowNestedTernaries": true,
"maximumLineLength": 80,
// Params
// FIXME: Uncomment when http://bit.ly/1Nrdw9s is fixed.
// "disallowUnusedParams": true,
"requireAlignedMultilineParams": 2,
// Specific Requires/Disallows
"disallowKeywords": ["with", "continue", "class"],
"safeContextKeyword": ["self"],
"disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
"disallowMultipleVarDecl": true
}