-
Notifications
You must be signed in to change notification settings - Fork 16
/
coffeelint.coffeescript.txt
105 lines (95 loc) · 7.59 KB
/
coffeelint.coffeescript.txt
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
COFFEELINT
coffeelint FILE.coffee #CoffeeScript linter.
#Output depends on
# - --reporter default|csv|jslint|checkstyle|raw|MODULE
# - possible MODULE: coffeelint-stylish (best)
# - --color=always|auto|never
#Options can also be specified with:
# - coffeelint.json in $PWD, .., ../../ (etc), $HOME
# - package.json coffeelintConfig OBJ
# - --file FILE
# - envvar COFFEELINT_CONFIG unless --noconfig
#and can be generated with --makeconfig
#Version 1.8.1
--stdin #If literate, must also use --literate then
--quiet #
--cache #
COFFEELINT.lint(STR[, OBJ]) #Node.js module.
#Errors are thrown OBJ2:
# - rule RULE_STR
# - lineNumber NUM
# - level STR
# - message STR
# - context STR
GULP-COFFEELINT([CONF_FILE|OBJ]) #Adds VINYL.coffeelint OBJ:
# - success BOOL
# - error|warningCount NUM
# - results OBJ_ARR
# - opt OBJ
# - literate BOOL
GULP-COFFEELINT.reporter(STR) #Must be after GULP-COFFEELINT(). STR can be:
# - "default" ("coffeelint-stylish")
# - "fail[OnWarning]": emit ERROR on error [and warnings]
#Can be used several times.
/=+===============================+=\
/ : : \
)==: RULES :==(
\ :_______________________________: /
\=+===============================+=/
RULES ==> #Can be tweaked with:
# - conf file RULE:
# - level "ignore|warn|error"
# - other params
# - CoffeeScript inline preceding comment:
# # coffeelint: disable|enable=RULE
#List:
#(problems)
# - coffeescript_error (def: error)
# - duplicate_key (def: error)
#(possible problems)
# - ensure_comprehensions (def: warn): parenthesis around (for ...) where return value is
# used
# - missing_fat_arrows (def: ignore): using @ in a FUNC without =>
# - no_empty_functions (def: ignore)
# - non_empty_constructor_needs_parens (def: ignore)
# - empty_constructor_needs_parens (def: ignore)
# - transform_messes_up_line_numbers (def: warn)
#(whitespaces)
# - indentation (def: error): consistent indentation
# Parameter: value NUM (def: 2)
# - no_tabs (def: error): spaces, not tabs
# - space_operators (def: ignore): space around operators
# - spacing_after_comma (def: ignore): space after commas
# - arrow_spacing (def: ignore): space around ->
# - colon_assignment_spacing (def: ignore): VAR:VAL, not VAR: VAL
# Parameter: spacing.left|right NUM (def: 0)
# - newlines_after_classes (def: ignore): several newlines after class declarations
# Parameters: value NUM (def: 3)
# - no_trailing_whitespace (def: error)
# Parameters: allowed_in_comments|empty_lines BOOL (def: false|true)
#(quotes)
# - no_interpolation_in_single_quotes (def: ignore): "#{}" not '#{}'
# - no_unnessary_double_quotes (def: ignore): 'VAR' not "VAR" unless needed
#(useless)
# - no_empty_param_list (def: ignore)
# - no_unnessary_fat_arrows (def: warn): =>, but this not used
#(using CoffeeScript)
# - prefer_english_operator (def: ignore): and|or|etc., not &&||||etc.
# - no_stand_alone_at (def: ignore): @VAR, but not @
# - no_plusplus (def: ignore): ++ or --
# - no_trailing_semicolons (def: error)
# - no_implicit_braces (def: ignore): CoffeeScript allows ommitting OBJ braces
# Parameters: strict BOOL (def: true)
# - no_implicit_parens (def: ignore): CoffeeScript allows ommitting () in FUNC calls
# Parameters: strict BOOL (def: true)
# - no_backticks (def: error)
# - no_debugger (def: warn): debugger statement
#(style)
# - camel_case_classes (def: error): CLASS CamelCase
# - line_endings (def: ignore): consistent line endings
# - max_line_length (def: error)
# Parameters: value NUM (def: 80), limitComments BOOL (def: true)
#(others)
# - no_throwing_strings (def: error): no throw STR