forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coffeelint.json
395 lines (395 loc) · 12.1 KB
/
coffeelint.json
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": true,
"definitions": {
"base": {
"type": "object",
"properties": {
"level": {
"description": "Determines the error level",
"type": "string",
"enum": ["error", "warn", "ignore"]
}
}
}
},
"id": "https://json.schemastore.org/coffeelint.json",
"properties": {
"arrow_spacing": {
"description": "This rule checks to see that there is spacing before and after the arrow operator that declares a function. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"braces_spacing": {
"description": "This rule checks to see that there is the proper spacing inside curly braces. The spacing amount is specified by `spaces`. The spacing amount for empty objects is specified by `empty_object_spaces`. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
],
"properties": {
"empty_object_spaces": {
"type": "integer",
"enum": [0, 1]
},
"spaces": {
"type": "integer",
"enum": [0, 1]
}
}
},
"camel_case_classes": {
"description": "This rule mandates that all class names are CamelCased. Camel casing class names is a generally accepted way of distinguishing constructor functions - which require the `new` prefix to behave properly - from plain old functions. [default level: error]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"coffeescript_error": {
"description": "[default level: error]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"colon_assignment_spacing": {
"description": "This rule checks to see that there is spacing before and after the colon in a colon assignment (i.e., classes, objects). [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
],
"properties": {
"spacing": {
"type": "object",
"properties": {
"left": {
"type": "integer",
"enum": [0, 1]
},
"right": {
"type": "integer",
"enum": [0, 1]
}
}
}
}
},
"cyclomatic_complexity": {
"description": "Examine the complexity of your application. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
],
"properties": {
"value": {
"type": "integer"
}
}
},
"duplicate_key": {
"description": "Prevents defining duplicate keys in object literals and classes. [default level: error]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"empty_constructor_needs_parens": {
"description": "Requires constructors with no parameters to include the parens. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"ensure_comprehensions": {
"description": "This rule makes sure that parentheses are around comprehensions. [default level: warn]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"eol_last": {
"description": "Checks that the file ends with a single newline. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"indentation": {
"description": "This rule imposes a standard number of spaces to be used for indentation. Since whitespace is significant in CoffeeScript, it's critical that a project chooses a standard indentation format and stays consistent. Other roads lead to darkness. [default level: error]",
"allOf": [
{
"$ref": "#/definitions/base"
}
],
"properties": {
"value": {
"type": "integer",
"enum": [2, 4]
}
}
},
"line_endings": {
"description": "This rule ensures your project uses only windows or unix line endings. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
],
"properties": {
"value": {
"type": "string",
"enum": ["unix", "windows"]
}
}
},
"max_line_length": {
"description": "This rule imposes a maximum line length on your code. [default level: error]",
"allOf": [
{
"$ref": "#/definitions/base"
}
],
"properties": {
"value": {
"type": "integer"
},
"limitComments": {
"type": "boolean"
}
}
},
"missing_fat_arrows": {
"description": "Warns when you use `this` inside a function that wasn't defined with a fat arrow. This rule does not apply to methods defined in a class, since they have `this` bound to the class instance (or the class itself, for class methods). [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"newlines_after_classes": {
"description": "Checks the number of newlines between classes and other code. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
],
"properties": {
"value": {
"type": "integer"
}
}
},
"no_backticks": {
"description": "Backticks allow snippets of JavaScript to be embedded in CoffeeScript. While some folks consider backticks useful in a few niche circumstances, they should be avoided because so none of JavaScript's 'bad parts', like with and eval, sneak into CoffeeScript. [default level: error]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_debugger": {
"description": "This rule detects the `debugger` statement. [default level: warn]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_empty_functions": {
"description": "Disallows declaring empty functions. The goal of this rule is that unintentional empty callbacks can be detected. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_empty_param_list": {
"description": "This rule prohibits empty parameter lists in function definitions. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_implicit_braces": {
"description": "This rule prohibits implicit braces when declaring object literals. Implicit braces can make code more difficult to understand, especially when used in combination with optional parenthesis. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
],
"properties": {
"strict": {
"type": "boolean"
}
}
},
"no_implicit_parens": {
"description": "This rule prohibits implicit parens on function calls. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_interpolation_in_single_quotes": {
"description": "This rule prohibits string interpolation in a single quoted string. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_nested_string_interpolation": {
"description": "This rule warns about nested string interpolation, as it tends to make code harder to read and understand. [default level: warn]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_plusplus": {
"description": "This rule forbids the increment and decrement arithmetic operators. Some people believe the `++` and `--` to be cryptic and the cause of bugs due to misunderstandings of their precedence rules. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_private_function_fat_arrows": {
"description": "Warns when you use the fat arrow for a private function inside a class definition scope. It is not necessary and it does not do anything. [default level: warn]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_stand_alone_at": {
"description": "This rule checks that no stand alone `@` are in use, they are discouraged. [default level: ignore]",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_tabs": {
"description": "This rule forbids tabs in indentation. Enough said. [default level: error]",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_this": {
"description": "This rule prohibits `this`. Use `@` instead. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_throwing_strings": {
"description": "This rule forbids throwing string literals or interpolations. While JavaScript (and CoffeeScript by extension) allow any expression to be thrown, it is best to only throw `Error` objects, because they contain valuable debugging information like the stack trace. [default level: error]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_trailing_semicolons": {
"description": "This rule prohibits trailing semicolons, since they are needless cruft in CoffeeScript. [default level: error]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_trailing_whitespace": {
"description": "This rule forbids trailing whitespace in your code, since it is needless cruft. [default level: error]",
"allOf": [
{
"$ref": "#/definitions/base"
}
],
"properties": {
"allowed_in_comments": {
"type": "boolean"
},
"allowed_in_empty_lines": {
"type": "boolean"
}
}
},
"no_unnecessary_double_quotes": {
"description": "This rule prohibits double quotes unless string interpolation is used or the string contains single quotes. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"no_unnecessary_fat_arrows": {
"description": "Disallows defining functions with fat arrows when `this` is not used within the function. [default level: warn]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"non_empty_constructor_needs_parens": {
"description": "Requires constructors with parameters to include the parens. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"prefer_english_operator": {
"description": "This rule prohibits `&&`, `||`, `==`, `!=` and `!`. Use `and`, `or`, `is`, `isnt`, and `not` instead. `!!` (for converting to a boolean) is ignored. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"space_operators": {
"description": "This rule enforces that operators have space around them. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"spacing_after_comma": {
"description": "This rule checks to make sure you have a space after commas. [default level: ignore]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
},
"transform_messes_up_line_numbers": {
"description": "This rule detects when changes are made by transform function, and warns that line numbers are probably incorrect. [default level: warn]",
"allOf": [
{
"$ref": "#/definitions/base"
}
]
}
},
"title": "JSON schema for coffeelint.json files",
"type": "object"
}