-
Notifications
You must be signed in to change notification settings - Fork 16
/
scss-lint.cli.txt
354 lines (262 loc) · 22.6 KB
/
scss-lint.cli.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
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
SCSS-LINT
VERSION ==> #0.47.1
#Sass linter.
ALTERNATIVES ==> #See stylelint
#Rules that should prefer another linter are indicated by:
C# - csslint
T# - stylelint
S# - scss-lint
CONFIG ==> #Can be:
# - scss-lint --config FILE.yml
# - .|~/.scss-lint.yml
CONFIG.scss_files #'GLOB'
RULES ==> #Can use:
# - scss-lint --include|exclude-linter RULE...
# - /* scss-lint:disable|enabled all|RULE,... */: block scoped
#There is a default set of enabled|disabled: should explicity define all
#rules instead.
-#Rules that only work for Sass are marked like this
CONFIG.linters.RULE #RULE_OPTS:
# - enabled BOOL
CONFIG.severity #'warning' (def) or 'error'
CONFIG.preprocess_command #Bash command to preprocess input
scss-lint [DIR|FILE...] #Def: stdin
#Exit code:
# - 0: ok
# - 1: warnings
# - 2: errors
# - 64: CLI usage error
# - 66: file not found
# - 69: PLUGIN not found
# - 70: unknown error
# - 78: invalid conf
# - 80: glob error
--stdin-file-path="FILE" #Required when using stdin
--out FILE #Def: stdout
CONFIG.exclude DIR|FILE...
--exclude DIR|FILE... #
--format FORMATTER #Can be:
# - 'default'
# - 'json'
# - 'tap'
# - 'checkstyle'
# - '[clean]files': shows files with [no] lint errors
# - 'config': generate config file
--[no-]color #
--require PLUGIN #Plugins are written in Ruby
CONFIG.plugin_gems #PLUGIN_ARR
CONFIG.plugin_directories #DIR_ARR
/=+===============================+=\
/ : : \
)==: ERRORS :==(
\ :_______________________________: /
\=+===============================+=/
PropertySpelling #Unknown property
#RULE_OPTS:
# - extra|disabled_properties STR_ARR: whitelist|blacklist
HexValidation T#No wrong hex format
DuplicateProperty T#No duplicate property
T#RULE_OPTS: ignore_consecutive BOOL (def: false) or STR_ARR
EmptyRule T#No empty block
UnnecessaryParentReference #Useless &, e.g. .CLASS { & > .CLASS2 } because .CLASS { > .CLASS2 } works
/=+===============================+=\
/ : : \
)==: NON-STANDARD :==(
\ :_______________________________: /
\=+===============================+=/
VendorPrefix T#No vendor prefixes
T#RULE_OPTS:
T# - identifier_list: 'base' (def, i.e. AutoPrefixer) or 'bourbon'
T# - additional|excluded_identifiers 'PROP'_ARR
Compass::PropertyWithMixin -#When browser support low, must use Compass mixin
-#RULE_OPTS: ignore STR_ARR
/=+===============================+=\
/ : : \
)==: NEWLINE :==(
\ :_______________________________: /
\=+===============================+=/
FinalNewline T#Newline at end of file
T#RULE_OPTS: present BOOL (def: true)
EmptyLineBetweenBlocks -#Newline between props blocks: inheritance, mixins, others, nested rules
-#RULE_OPTS: ignore_single_line_blocks BOOL (def: true)
SingleLinePerSelector T#Newline after , in selectors
SingleLinePerProperty T#Newline after ;
T#RULE_OPTS: allow_single_line_rule_sets BOOL (def: true)
ElsePlacement -#Newline before @else
-#RULE_OPTS: style 'same_line' (def) or 'new_line'
TrailingSemicolon T# ; for the last rule of a ruleset
/=+===============================+=\
/ : : \
)==: INDENT/WIDTH :==(
\ :_______________________________: /
\=+===============================+=/
Indentation T#Identation.
T#RULE_OPTS:
T# - character 'tab' or 'space' (def)
T# - width NUM (def: 2)
T# - allow_non_nested_indentation BOOL: if true (def: false), only applies rule
T# to nested rulesets
/=+===============================+=\
/ : : \
)==: SPACE :==(
\ :_______________________________: /
\=+===============================+=/
TrailingWhitespace T#No trailing whitespace
SpaceBeforeBrace T#Space before {
T#RULE_OPTS:
T# - style: 'space' (def) or 'new_line'
T# - allow_single_line_padding BOOL: if true (def), allow single-line
T# rulesets extra spaces for vertical alignment
SpaceAroundOperator T#Space around + - * / % == != > >= < <=
T#RULE_OPTS: style 'one_space' (def), 'no_space' or 'at_least_one_space'
SpaceAfterProperty|VariableName T#Space before : in properties|variables
SpaceAfterProperty|VariableColon T#Space after : in properties|variables
T#RULE_OPTS: 'one_space' (def), 'no_space', 'at_least_one_space', 'aligned',
T#'one_space_or_newline'
SpaceAfterComma T#Space after , in values
T#RULE_OPTS: style 'one_space' (def), 'no_space' or 'at_least_one_space'
SpaceBetweenParens T#Space around ( )
T#RULE_OPTS: spaces NUM (def: 0)
BangFormat T#Space before|after !
T#RULE_OPTS: space_before|after_bang BOOL (def: true|false)
/=+===============================+=\
/ : : \
)==: COMMENTS :==(
\ :_______________________________: /
\=+===============================+=/
Comment T#Prefer // COMMENT ('silent') or /* COMMENT */ ('loud')
T#RULE_OPTS:
T# - style 'silent' (def) or 'loud'
T# - allowed REGEXP: ignore rule when REGEXP matches
DisableLinterReason #Comment before /* scss-lint:disable */
/=+===============================+=\
/ : : \
)==: SELECTORS :==(
\ :_______________________________: /
\=+===============================+=/
SelectorFormat T#Selector naming scheme
T#RULE_OPTS:
T# - [class|placeholder|id|attribute_]convention REGEXP or
T# 'hyphenated_lowercase|snake_case|camel_case|strict_BEM|hyphenated_BEM'
T# - [class|placeholder|id|attribute_]convention_explanation STR
T# - ignored_names SELECTOR_ARR
T# - ignored_types STR_ARR, among 'class|placeholder|id|attribute|element'
T#Does not resolve &
PseudoElement T#::PSEUDO not :PSEUDO
IdSelector T#No #ID
ChainedClasses #No .CLASS.CLASS2
QualifyingElement #No TAG.SELECTOR
SelectorDepth #Max number of SELECTOR in a group
#RULE_OPTS: max_depth NUM (def: 3)
BemDepth #Max number of __ELEM__SUBELEM in BEM notation
#RULE_OPTS: max_elements NUM (def: 1)
ImportantRule T#No !important
/=+===============================+=\
/ : : \
)==: PROPS :==(
\ :_______________________________: /
\=+===============================+=/
DeclarationOrder -#Props order: inheritance, mixin with no content, others, mixin with content, nested rules
PropertySortOrder #Props order for normal properties
#RULE_OPTS:
# - order:
# - nil (def): alphabetical
# - PROP_ARR: can use nil for newlines
# - 'smacss': display/positioning, box model, border, background, text, other
# - 'recess': positioning, display, box model, text, background, border, transformations, others
# - 'concentric': display/positioning, transformations, visibility, margin->padding, content, text, others
# - separate_groups BOOL (def: false): newline between groups
# - min_properties NUM (def: 2): before sorting
# - ignore_unspecified BOOL: if false (def), do not ignore props not specified in order
PropertyCount #Max number of props
#RULE_OPTS:
# - max_properties NUM
# - include_nested BOOL: if true (def: false), include nested rulesets
/=+===============================+=\
/ : : \
)==: VALUES :==(
\ :_______________________________: /
\=+===============================+=/
BorderZero #Prefer border: 0|none
#RULE_OPTS: convention '0' (def) or 'none'
HexNotation T#Color hex case
T#RULE_OPTS: style 'lowercase' (def) or 'uppercase'
HexLength T#Color hex format
T#RULE_OPTS: style 'short' (def) or 'long'
ColorKeyword T#Do not use color keyword
ZeroUnit T#Unitless 0 for LEN
LeadingZero T#0.5 or .5
T#RULE_OPTS: style 'exclude_zero' (def) or 'include_zero'
TrailingZero T#No trailing zeros in FLOAT
UnnecessaryMantissa #1 not 1.0
PropertyUnits T#Which units to use for LENP
T#RULE_OPTS:
T# - global 'UNIT'_ARR
T# - properties: PROP: 'UNIT'_ARR
TransitionAll #Do not use 'all' in transitions
UrlFormat #Do not use protocol nor domain in url()
Shorthand #Use shortest possible value for shorthand properties, e.g. margin: 1px not margin: 1px 1px
/=+===============================+=\
/ : : \
)==: QUOTES :==(
\ :_______________________________: /
\=+===============================+=/
StringQuotes T#Quotes in STR
T#RULE_OPTS: 'single_quotes' (def) or 'double_quotes'
UrlQuotes T#Single quotes in url()
/=+===============================+=\
/ : : \
)==: NESTING :==(
\ :_______________________________: /
\=+===============================+=/
MergeableSelector #No duplicate selectors
#Force using nesting and & for reused selectors
#RULE_OPTS:
# - force_nesting BOOL (def: true)
# - whitelist 'SELECTOR'_ARR
NestingDepth #Max nesting depth
#RULE_OPTS:
# - max_depth NUM (def: 3)
# - ignore_parent_selectors BOOL (def: false): do not count & rules
/=+===============================+=\
/ : : \
)==: MIXINS/FUNC/VARIABLES NAMING :==(
\ :_______________________________: /
\=+===============================+=/
NameFormat -#Mixins|functions|variables|placeholders naming
-#RULE_OPTS:
-# - [function|mixin|variable|placeholder_]convention REGEXP or 'hyphenated_lowercase', 'camel_case' or 'snake_case'
-# - [function|mixin|variable|placeholder_]convention_explanation STR
-# - allow_leading_underscore BOOL (def: true)
/=+===============================+=\
/ : : \
)==: VARIABLES :==(
\ :_______________________________: /
\=+===============================+=/
PrivateNamingConvention -#Do not allow private variables usage beside their own file
-#RULE_OPTS: prefix STR (def: '_')
ColorVariable -#Only use variables for colors (except currentColor|inherit|transparent)
VariableForProperty -#Only use variables for given PROP (except currentColor|inherit|transparent)
-#RULE_OPTS: properties 'PROP'_ARR
/=+===============================+=\
/ : : \
)==: INHERITANCE :==(
\ :_______________________________: /
\=+===============================+=/
ExtendDirective -#No @extend
PlaceholderInExtend -#Use %placeholder
/=+===============================+=\
/ : : \
)==: LOGIC/LOOP :==(
\ :_______________________________: /
\=+===============================+=/
DebugStatement -#No @debug
/=+===============================+=\
/ : : \
)==: IMPORT :==(
\ :_______________________________: /
\=+===============================+=/
ImportPath -#@import should not start with _ nor end with extension
-#RULE_OPTS: leading_underscore BOOL (def: false), filename_extensions BOOL (def: false)