forked from nvdnkpr/batch-request
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.jscsrc
104 lines (104 loc) · 5.13 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
{
"fileExtensions": [".js", "jscs", ".json"],
"excludeFiles": ["assets/js/libs/**"],
// Requires parentheses around immediately invoked function expressions.
"requireParenthesesAroundIIFE": true,
// Check line break characters
"validateLineBreaks": "LF",
// Validates indentation for switch statements and block statements
"validateIndentation": 4,
// Requires sticking unary operators to the right.
"disallowSpaceAfterPrefixUnaryOperators": true,
// Requires sticking unary operators to the left.
"disallowSpaceBeforePostfixUnaryOperators": true,
// Disallows sticking binary operators to the left.
"requireSpaceBeforeBinaryOperators": true,
// Disallows sticking binary operators to the right.
"requireSpaceAfterBinaryOperators": true,
// Disallows identifiers that start or end in _.
"disallowDanglingUnderscores": null,
// Disallows space after object keys.
"disallowSpaceAfterObjectKeys": true,
// Requires space after object keys.
"requireSpaceBeforeObjectValues": true,
// Requires commas as last token on a line in lists.
"requireCommaBeforeLineBreak": true,
// Requires space after keyword.
"requireSpaceAfterKeywords": true,
// Requires space(s) before block statements (for loops, control structures).
"requireSpaceBeforeBlockStatements": true,
// Requires space before and/or after ? or : in conditional expressions.
"requireSpacesInConditionalExpression": true,
// Requires curly braces after statements.
"requireCurlyBraces": true,
// Requires blocks to begin and end with a newline
"requireBlocksOnNewline": true,
// Disallows space after opening object curly brace and before closing.
"disallowSpacesInsideObjectBrackets": true,
// Disallows space after opening array square bracket and before closing. Reports only on arrays, not on property accessors.
"disallowSpacesInsideArrayBrackets": true,
// Disallows space after opening round bracket and before closing.
"disallowSpacesInsideParentheses": true,
// Disallows strings that span multiple lines without using concatenation.
"disallowMultipleLineStrings": true,
// Disallows multiple blank lines in a row.
"disallowMultipleLineBreaks": true,
// Requires lines to not contain both spaces and tabs consecutively, or spaces after tabs only for alignment if "smart"
"disallowMixedSpacesAndTabs": true,
// Requires all lines to end on a non-whitespace character
"disallowTrailingWhitespace": true,
// Disallows an extra comma following the final element of an array or object literal.
"disallowTrailingComma": true,
// Disallows placing keywords on a new line.
"disallowKeywordsOnNewLine": ["else"],
// Disallows newline before opening curly brace of all block statements.
"disallowNewlineBeforeBlockStatements": true,
// Requires all quote marks to be either the supplied value, or consistent if true
"validateQuoteMarks": "'",
// Enable validation of separators between function parameters. Will ignore newlines.
"validateParameterSeparator": ", ",
// Requires placing line feed at file end.
"requireLineFeedAtFileEnd": true,
// Requires constructors to be capitalized (except for this)
"requireCapitalizedConstructors": true,
// Requires that a line comment (//) be followed by a space.
"requireSpaceAfterLineComment": true,
// Requires the variable to be the left hand operator when doing a boolean comparison
"disallowYodaConditions": true,
// Option to check var that = this expressions. We are using self
"safeContextKeyword": ["self"],
// Disallows empty blocks (except for catch blocks).
"disallowEmptyBlocks": true,
// Requires space before () or {} in function expressions (both named and anonymous).
"requireSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
// Requires space before () or {} in anonymous function expressions.
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
// Requires space before () or {} in named function expressions.
"requireSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
// Requires space before () or {} in function declarations.
"requireSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
// Requires space before () or {} in function expressions (both named and anonymous) and function declarations.
"requireSpacesInFunction": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
// Requires all lines to be at most the number of characters specified
"maximumLineLength": 100,
// Disallows multiple var declaration (except for-loop).
"disallowMultipleVarDecl": true,
"requirePaddingNewlinesInBlocks":{ "open": true, "close": false, "allExcept": ["conditionals"] }
// "requireCamelCaseOrUpperCaseIdentifiers": true,
// "disallowSpacesInCallExpression": true,
}