-
Notifications
You must be signed in to change notification settings - Fork 86
/
.scss-lint.yml
394 lines (351 loc) · 9.17 KB
/
.scss-lint.yml
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
linters:
# Reports when you use improper spacing around ! (the "bang") in !important and !default declarations.
BangFormat:
enabled: true
severity: error
# Prefer border: 0 over border: none.
BorderZero:
enabled: true
severity: error
# Prefer hexadecimal color codes over color keywords
ColorKeyword:
enabled: true
severity: error
# Prefer // comments over /* ... */
Comment:
enabled: true
severity: error
# Reports !debug statements
DebugStatement:
enabled: true
severity: warning
# Forces Extend, Mixins with no content, properties, mixins with content, nested rules
DeclarationOrder:
enabled: true
severity: error
# Prevent duplicate properties
DuplicateProperty:
enabled: true
severity: error
# Forces `else` on to new line
ElsePlacement:
enabled: true
severity: error
style: new_line
# Separate rule, function, and mixin declarations with empty lines.
EmptyLineBetweenBlocks:
enabled: true
severity: error
ignore_single_line_blocks: false
# Reports when you have an empty rule set.
EmptyRule:
enabled: true
severity: error
# Files should always have a final newline.
FinalNewline:
enabled: true
severity: error
present: true
# Specifies whether you prefer shorthand or long-form hexadecimal colors by setting the style option to short or long, respectively.
HexLength:
enabled: true
severity: error
style: short
# Checks if hexadecimal colors are written in lowercase.
HexNotation:
enabled: true
severity: error
style: lowercase
# Ensure hexadecimal colors are valid
HexValidation:
enabled: true
severity: error
# Don't combine additional selectors with an ID selector.
IdWithExtraneousSelector:
enabled: true
severity: error
# The basenames of @imported SCSS partials should not begin with an underscore and should not include the filename extension
ImportPath:
enabled: true
severity: error
leading_underscore: false
filename_extension: false
# Use two spaces per indentation level.
Indentation:
enabled: true
severity: error
character: space
width: 2
# Dont write leading zeros for numeric values with a decimal point.
LeadingZero:
enabled: true
severity: error
style: exclude_zero
# Reports when you define the same selector twice in a single sheet.
MergeableSelector:
enabled: true
severity: warning
force_nesting: true
# Functions, mixins, and variables should be declared with all lowercase letters and hyphens instead of underscores.
NameFormat:
enabled: true
severity: error
convention: hyphenated_lowercase
# Avoid nesting selectors too deeply.
NestingDepth:
enabled: true
severity: error
max_depth: 3
# Always use placeholder selectors in @extend.
PlaceholderInExtend:
enabled: true
severity: error
# Sort properties in a strict order.
# Using RECESS order (https://github.com/twitter/recess/blob/master/lib/lint/strict-property-order.js#L36)
PropertySortOrder:
enabled: true
severity: error
order:
- position
- top
- right
- bottom
- left
- z-index
- display
- float
- width
- height
- max-width
- max-height
- min-width
- min-height
- padding
- padding-top
- padding-right
- padding-bottom
- padding-left
- margin
- margin-top
- margin-right
- margin-bottom
- margin-left
- margin-collapse
- margin-top-collapse
- margin-right-collapse
- margin-bottom-collapse
- margin-left-collapse
- overflow
- overflow-x
- overflow-y
- clip
- clear
- font
- font-family
- font-size
- font-smoothing
- osx-font-smoothing
- font-style
- font-weight
- hyphens
- src
- line-height
- letter-spacing
- word-spacing
- color
- text-align
- text-decoration
- text-indent
- text-overflow
- text-rendering
- text-size-adjust
- text-shadow
- text-transform
- word-break
- word-wrap
- white-space
- vertical-align
- list-style
- list-style-type
- list-style-position
- list-style-image
- pointer-events
- cursor
- background
- background-attachment
- background-color
- background-image
- background-position
- background-repeat
- background-size
- border
- border-collapse
- border-top
- border-right
- border-bottom
- border-left
- border-color
- border-image
- border-top-color
- border-right-color
- border-bottom-color
- border-left-color
- border-spacing
- border-style
- border-top-style
- border-right-style
- border-bottom-style
- border-left-style
- border-width
- border-top-width
- border-right-width
- border-bottom-width
- border-left-width
- border-radius
- border-top-right-radius
- border-bottom-right-radius
- border-bottom-left-radius
- border-top-left-radius
- border-radius-topright
- border-radius-bottomright
- border-radius-bottomleft
- border-radius-topleft
- content
- quotes
- outline
- outline-offset
- opacity
- filter
- visibility
- size
- zoom
- transform
- box-align
- box-flex
- box-orient
- box-pack
- box-shadow
- box-sizing
- table-layout
- animation
- animation-delay
- animation-duration
- animation-iteration-count
- animation-name
- animation-play-state
- animation-timing-function
- animation-fill-mode
- transition
- transition-delay
- transition-duration
- transition-property
- transition-timing-function
- background-clip
- backface-visibility
- resize
- appearance
- user-select
- interpolation-mode
- direction
- marks
- page
- set-link-source
- unicode-bidi
- speak
ignore_unspecified: false
# Reports when you use an unknown CSS property
PropertySpelling:
enabled: true
severity: error
# Avoid qualifying elements in selectors
QualifyingElement:
enabled: true
severity: error
allow_element_with_attribute: false
allow_element_with_class: false
allow_element_with_id: false
# Don't write selectors with a depth of applicability greater than 3.
SelectorDepth:
enabled: true
severity: error
max_depth: 3
# It is good practice to choose a convention for naming selectors.
SelectorFormat:
enabled: true
severity: error
convention: BEM
# Prefer the shortest shorthand form possible for properties that support it.
Shorthand:
enabled: true
severity: error
# Properties within rule sets should each reside on their own line.
SingleLinePerProperty:
enabled: true
severity: error
allow_single_line_rule_sets: false
# Split selectors onto separate lines after each comma.
SingleLinePerSelector:
enabled: true
severity: error
# Commas in lists should be followed by a space.
SpaceAfterComma:
enabled: true
severity: error
# Properties should be formatted with a single space separating the colon from the property's value.
SpaceAfterPropertyColon:
enabled: true
severity: error
style: one_space
# Properties should be formatted with no space between the name and the colon.
SpaceAfterPropertyName:
enabled: true
severity: error
# Opening braces should be preceded by a single space.
SpaceBeforeBrace:
enabled: true
severity: error
allow_single_line_padding: false
style: space
# Parentheses should not be padded with spaces.
SpaceBetweenParens:
enabled: true
severity: error
spaces: 0
# String literals should be written with single quotes unless using double quotes would save on escape characters.
StringQuotes:
enabled: true
severity: error
style: single_quotes
# Property values; @extend, @include, and @import directives; and variable declarations should always end with a semicolon.
TrailingSemicolon:
enabled: true
severity: error
# Don't write trailing zeros for numeric values with a decimal point.
TrailingZero:
enabled: true
severity: error
# Numeric values should not contain unnecessary fractional portions.
UnnecessaryMantissa:
enabled: true
severity: error
# Do not use parent selector references (&) when they would otherwise be unnecessary.
UnnecessaryParentReference:
enabled: true
severity: error
# URLs should not contain protocols or domain names.
UrlFormat:
enabled: true
severity: error
# URLs should always be enclosed within quotes.
UrlQuotes:
enabled: true
severity: error
# Avoid vendor prefixes. That is, don't write them yourself.
VendorPrefixes:
enabled: true
severity: error
identifier_list: base
# Omit length units on zero values.
ZeroUnit:
enabled: true
severity: error