This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
/
.jscsrc
181 lines (154 loc) · 4.78 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
// Allow to parse all errors in a file.
"maxErrors": "Infinity",
// While idiomatic js guide gets released…
// https://github.com/jscs-dev/node-jscs/blob/master/presets/idiomatic.json
// -------------------------------------------------------------------------
"preset": "jquery",
"requireSpacesInsideParentheses": {
"all": true,
"ignoreParenthesizedExpression": true,
"except": [
"{", "}",
"[", "]",
"function",
"\""
]
},
"disallowSpacesInCallExpression": true,
"requireSpaceAfterLineComment": {
"allExcept": [
"#",
"="
]
},
"disallowMultipleLineBreaks": null,
"requireCapitalizedComments": null,
// The following are style–guides for Alpha Founders.
// -------------------------------------------------------------------------
// Indentation should be 4 spaces.
"validateIndentation": 4,
// All quote marks should be '.
"validateQuoteMarks": "'",
// No line should be longer than 120 characters.
"maximumLineLength": {
"value": 120,
"tabSize": 4,
"allExcept": [
"urlComments",
"regex"
]
},
// Require newline before line comments.
"requirePaddingNewLinesBeforeLineComments": {
"allExcept": "firstAfterCurly"
},
// Require space before keywords. This list is consistent with the jQuery
// preset for requireSpaceAfterKeywords.
"requireSpaceBeforeKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
// Require space after object keys.
"requireSpaceBeforeObjectValues": true,
// Enable validation of separators between function parameters.
"validateParameterSeparator": ", ",
// Require space before {} in function expressions.
"requireSpacesInFunction": {
"beforeOpeningCurlyBrace": true
},
// Disallow space before () in function expressions.
"disallowSpacesInFunction": {
"beforeOpeningRoundBrace": true
},
// Require an extra blank newline after var declarations.
"requirePaddingNewLineAfterVariableDeclaration": true,
// Require a blank line after `'use strict';` statements.
"requirePaddingNewLinesAfterUseStrict": true,
// Require newline after blocks.
"requirePaddingNewLinesAfterBlocks": {
"allExcept": [
"inCallExpressions",
"inNewExpressions",
"inArrayExpressions",
"inProperties"
]
},
// Require an empty line above the specified keywords.
// @see https://docs.webplatform.org/wiki/javascript/reserved_words
"requirePaddingNewlinesBeforeKeywords": [
"case",
"continue",
"debugger",
"default",
"delete",
"do",
"for",
"if",
"new",
"return",
"switch",
"throw",
"try",
"void",
"while",
"with",
"yield",
"let"
],
// Require placing object keys on new line.
"requireObjectKeysOnNewLine": true,
// Require a $ before variable names that are jquery assignments.
"requireDollarBeforejQueryAssignment": "ignoreProperties",
// Require var declaration to be on the top of an enclosing scope.
"requireVarDeclFirst": true,
// Disallow multiple var declaration (except for-loop).
"disallowMultipleVarDecl": {
"allExcept" : [
"undefined"
]
},
// Require space after opening and before closing grouping parentheses.
"requireSpacesInsideParenthesizedExpression": {
"allExcept": [
"function",
"{", "}",
"[", "]"
]
},
// Require identifiers to be camelCased or UPPERCASE_WITH_UNDERSCORES.
// This won’t be sustainable for now.
"requireCamelCaseOrUpperCaseIdentifiers": false,
// Validate JSDoc rules.
"jsDoc": {
"checkAnnotations": {
"preset": "jsdoc3"
},
"checkParamNames": true,
"requireParamTypes": true,
"checkRedundantParams": true,
"checkReturnTypes": true,
"checkRedundantReturns": true,
"requireReturnTypes": true,
"checkTypes": true,
"checkRedundantAccess": true,
// This should be enabled on next PR, after upgrading JSCS to new version.
// "enforceExistence": {
// "allExcept": [
// "expressions",
// "exports",
// "paramless-procedures"
// ]
// },
"requireHyphenBeforeDescription": true,
"requireNewlineAfterDescription": true,
"requireDescriptionCompleteSentence": true
}
}