forked from alphagov/govuk-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.sass-lint.yml
507 lines (440 loc) · 18.4 KB
/
.sass-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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
# Not yet supported by sass-lint:
# ChainedClasses, DisableLinterReason, ElsePlacement, PropertyCount
# PseudoElement, SelectorDepth, SpaceAroundOperator, TrailingWhitespace
# UnnecessaryParentReference, Compass::*
#
# The following settings/values are unsupported by sass-lint:
# Linter Comment, option "style"
# Linter Indentation, option "allow_non_nested_indentation"
# Linter Indentation, option "character"
# Linter NestingDepth, option "ignore_parent_selectors"
# Linter SpaceBeforeBrace, option "allow_single_line_padding"
files:
include: '**/*.s+(a|c)ss'
options:
formatter: stylish
merge-default-rules: true
rules:
# Rule bem-depth will enforce how many elements a BEM selector can contain.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/bem-depth.md
bem-depth: 0
# Rule border-zero will enforce whether one should use 0 or none when specifying a zero border value
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/border-zero.md
border-zero: 2
# Rule brace-style will enforce the use of the chosen brace style.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/brace-style.md
brace-style:
- 2
- allow-single-line: false
# Rule class-name-format will enforce a convention for class names.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/class-name-format.md#example-7
# will allow .block {}, .block__element{}, .block--modifier {}
class-name-format:
- 2
- convention: hyphenatedbem
# Rule clean-import-paths will enforce whether or not @import paths should have leading underscores and/or filename extensions.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/clean-import-paths.md
clean-import-paths:
- 2
- filename-extension: false
leading-underscore: false
# TODO: empty-args
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/empty-args.md
# Rule empty-line-between-blocks will enforce whether or not nested blocks should include a space between the last non-comment declaration or not.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/empty-line-between-blocks.md
empty-line-between-blocks:
- 2
- ignore-single-line-rulesets: true
# Rule extends-before-declarations will enforce that extends should be written before declarations in a ruleset.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/extends-before-declarations.md
extends-before-declarations: 0
# Rule extends-before-mixins will enforce that extends should be written before mixins in a ruleset.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/extends-before-mixins.md
extends-before-mixins: 0
# Rule final-newline will enforce whether or not files should end with a newline.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/final-newline.md
final-newline:
- 2
- include: true
# Rule force-attribute-nesting will enforce the nesting of attributes
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/force-attribute-nesting.md
force-attribute-nesting:
- 0
# Rule force-element-nesting will enforce the nesting of elements
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/force-element-nesting.md
force-element-nesting:
- 0
# Rule force-pseudo-nesting will enforce the nesting of pseudo elements/classes.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/force-pseudo-nesting.md
force-pseudo-nesting:
- 0
# Rule function-name-format will enforce a convention for function names.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/function-name-format.md
function-name-format:
- 2
- allow-leading-underscore: true
convention: hyphenatedlowercase
# Rule hex-length will enforce the length of hexadecimal values
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/hex-length.md
hex-length:
- 2
- style: long
# Rule hex-notation will enforce the case of hexadecimal values
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/hex-notation.md
hex-notation:
- 2
- style: lowercase
# Rule id-name-format will enforce a convention for ids.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/id-name-format.md
id-name-format:
- 2
- convention: hyphenatedlowercase
# Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/indentation.md
indentation:
- 2
- size: 2
# Rule leading-zero will enforce whether or not decimal numbers should include a leading zero.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/leading-zero.md
leading-zero:
- 2
- include: false
# Rule mixin-name-format will enforce a convention for mixin names.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/mixin-name-format.md
mixin-name-format:
- 2
- allow-leading-underscore: true
convention: hyphenatedlowercase
# Rule mixins-before-declarations will enforce that mixins should be written before declarations in a ruleset.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/mixins-before-declarations.md
mixins-before-declarations: 0
# Rule nesting-depth will enforce how deeply a selector can be nested.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/nesting-depth.md
nesting-depth:
- 2
- max-depth: 3
# TODO: no-attribute-selectors
# Rule no-attribute-selectors will warn against the use of attribute selectors.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-attribute-selectors.md
# TODO: no-colour-hex
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-color-hex.md
# Rule no-color-keywords will enforce the use of hexadecimal color values rather than literals.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-color-keywords.md
no-color-keywords: 2
# Rule no-color-literals will disallow the use of color literals and basic color functions in any declarations other than variables or maps/lists.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-color-literals.md
no-color-literals:
- 2
- allow-rgba: true
# TODO: no-combniators
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-combinators.md
# Rule no-css-comments will enforce the use of Sass single-line comments and disallow CSS comments. Bang comments (/*! */, will be printed even in minified mode) are still allowed.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-css-comments.md
no-css-comments: 2
# Rule no-debug will enforce that @debug statements are not allowed to be used.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-debug.md
no-debug: 2
# TODO: no-disallowed-properties
# Rule no-disallowed-properties will warn against the use of certain properties.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-disallowed-properties.md
# Rule no-duplicate-properties will enforce that duplicate properties are not allowed within the same block.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-duplicate-properties.md
no-duplicate-properties: 2
# Rule no-empty-rulesets will enforce that rulesets are not empty.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-empty-rulesets.md
no-empty-rulesets: 2
# Rule no-extends will enforce that @extend is not allowed to be used.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-extends.md
no-extends: 0
# Rule no-ids will enforce that ID selectors are not allowed to be used.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-ids.md
no-ids: 2
# Rule no-important will enforce that important declarations are not allowed to be used.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-important.md
no-important: 0
# Rule no-invalid-hex will enforce that only valid of hexadecimal values are written.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-invalid-hex.md
no-invalid-hex: 2
# Rule no-mergeable-selectors will enforce that selectors aren't repeated and that their properties are merged.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-mergeable-selectors.md
no-mergeable-selectors: 0
# Rule no-misspelled-properties will enforce the correct spelling of CSS properties and prevent the use of unknown CSS properties.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-misspelled-properties.md
no-misspelled-properties: 2
# Rule no-qualifying-elements will enforce that selectors are not allowed to have qualifying elements.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-qualifying-elements.md
no-qualifying-elements:
- 2
- allow-element-with-attribute: true
allow-element-with-class: false
allow-element-with-id: false
# TODO: no-trailing-whitespace
# Rule no-trailing-whitespace will enforce that trailing whitespace is not allowed.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-trailing-whitespace.md
# Rule no-trailing-zero will enforce that trailing zeros are not allowed.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-trailing-zero.md
no-trailing-zero: 2
# Rule no-transition-all will enforce whether the keyword all can be used with the transition or transition-property property.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-transition-all.md
no-transition-all: 2
# TODO: no-universal-selectors
# Rule no-universal-selectors will warn against the use of * (universal) selectors.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-universal-selectors.md
# Rule no-url-protocols will enforce that protocols and domains are not used within urls.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-url-protocols.md
no-url-protocols: 2
# Rule no-vendor-prefixes will enforce that vendor prefixes are not allowed to be used.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-vendor-prefixes.md
no-vendor-prefixes: 0
# Rule placeholder-in-extend will enforce whether extends should only include placeholder selectors.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/placeholder-in-extend.md
placeholder-in-extend: 2
# Rule placeholder-name-format will enforce a convention for placeholder names.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/placeholder-name-format.md
placeholder-name-format:
- 2
- convention: hyphenatedlowercase
# Rule property-sort-order will enforce the order in which declarations are written.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/property-sort-order.md
property-sort-order:
- 2
- order:
- 'content'
- 'quotes'
# Box-sizing - Allow here until global is decided
- 'box-sizing'
-
- 'display'
- 'visibility'
-
- 'position'
- 'z-index'
- 'top'
- 'right'
- 'bottom'
- 'left'
-
- 'width'
- 'min-width'
- 'max-width'
- 'height'
- 'min-height'
- 'max-height'
-
- 'margin'
- 'margin-top'
- 'margin-right'
- 'margin-bottom'
- 'margin-left'
-
- 'padding'
- 'padding-top'
- 'padding-right'
- 'padding-bottom'
- 'padding-left'
-
- 'float'
- 'clear'
-
- 'overflow'
- 'overflow-x'
- 'overflow-y'
-
- 'clip'
- 'zoom'
-
- 'columns'
-
- 'table-layout'
- 'empty-cells'
- 'caption-side'
- 'border-spacing'
- 'border-collapse'
-
- 'list-style'
- 'list-style-position'
- 'list-style-type'
- 'list-style-image'
-
- 'transform'
- 'transition'
- 'animation'
-
- 'border'
- 'border-top'
- 'border-right'
- 'border-bottom'
- 'border-left'
-
- 'border-width'
- 'border-top-width'
- 'border-right-width'
- 'border-bottom-width'
- 'border-left-width'
-
- 'border-style'
- 'border-top-style'
- 'border-right-style'
- 'border-bottom-style'
- 'border-left-style'
-
- 'border-radius'
- 'border-top-left-radius'
- 'border-top-right-radius'
- 'border-bottom-left-radius'
- 'border-bottom-right-radius'
-
- 'border-color'
- 'border-top-color'
- 'border-right-color'
- 'border-bottom-color'
- 'border-left-color'
-
- 'outline'
- 'outline-color'
- 'outline-offset'
- 'outline-style'
- 'outline-width'
-
- 'opacity'
# Color has been moved to ensure it appears before background
- 'color'
- 'background'
- 'background-color'
- 'background-image'
- 'background-repeat'
- 'background-position'
- 'background-size'
- 'box-shadow'
- 'fill'
-
- 'font'
- 'font-family'
- 'font-size'
- 'font-style'
- 'font-variant'
- 'font-weight'
-
- 'font-emphasize'
-
- 'letter-spacing'
- 'line-height'
- 'list-style'
- 'word-spacing'
-
- 'text-align'
- 'text-align-last'
- 'text-decoration'
- 'text-indent'
- 'text-justify'
- 'text-overflow'
- 'text-overflow-ellipsis'
- 'text-overflow-mode'
- 'text-rendering'
- 'text-outline'
- 'text-shadow'
- 'text-transform'
- 'text-wrap'
- 'word-wrap'
- 'word-break'
-
- 'text-emphasis'
-
- 'vertical-align'
- 'white-space'
- 'word-spacing'
- 'hyphens'
-
- 'src'
- 'cursor'
- '-webkit-appearance'
# Rule property-units will disallow the use of units not specified in global or per-property.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/property-units.md
property-units:
- 2
- global: [
'cm',
'em',
'pt',
'px',
'rem',
'vh'
]
# Rule pseudo-element will enforce that:
# - pseudo-elements must start with double colons
# - pseudo-classes must start with single colon
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/pseudo-element.md
pseudo-element:
- 0
# Rule quotes will enforce whether single quotes ('') or double quotes ("") should be used for all strings.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/quotes.md
quotes:
- 2
- style: double
# Rule shorthand-values will enforce that values in their shorthand form are as concise as specified.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/shorthand-values.md
shorthand-values:
- 0
- allowed-shorthands:
- 1
- 2
- 3
# Rule single-line-per-selector will enforce whether selectors should be placed on a new line.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/single-line-per-selector.md
single-line-per-selector: 2
# Rule space-after-bang will enforce whether or not a space should be included after a bang (!).
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-after-bang.md
space-after-bang:
- 2
- include: false
# Rule space-after-colon will enforce whether or not a space should be included after a colon (:).
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-after-colon.md
space-after-colon:
- 2
- include: true
# Rule space-after-comma will enforce whether or not a space should be included after a comma (,).
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-after-comma.md
space-after-comma:
- 2
- include: true
# Rule space-around-operator will enforce whether or not a single space should be included before and after the following operators: +, -, /, *, %, <, > ==, !=, <= and >=.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-around-operator.md
space-around-operator:
- 2
- include: true
# Rule space-before-bang will enforce whether or not a space should be included before a bang (!).
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-before-bang.md
space-before-bang:
- 2
- include: true
# Rule space-before-brace will enforce whether or not a space should be included before a brace ({).
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-before-brace.md
space-before-brace:
- 2
- include: true
# Rule space-before-colon will enforce whether or not a space should be included before a colon (:).
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-before-colon.md
space-before-colon: 2
# Rule space-between-parens will enforce whether or not a space should be included before the first item and after the last item inside parenthesis (()).
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-between-parens.md
space-between-parens: 0
# Rule trailing-semicolon will enforce whether the last declaration in a block should include a semicolon (;) or not.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/trailing-semicolon.md
trailing-semicolon: 2
# Rule url-quotes will enforce that URLs are wrapped in quotes.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/url-quotes.md
url-quotes: 2
# Rule variable-for-property will enforce the use of variables for the values of specified properties.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/variable-for-property.md
variable-for-property:
- 0
- properties: []
# Rule variable-name-format will enforce a convention for variable names.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/variable-name-format.md
variable-name-format:
- 2
- allow-leading-underscore: true
convention: hyphenatedlowercase
# Rule zero-unit will enforce whether or not values of 0 used for length should be unitless.
# https://github.com/sasstools/sass-lint/blob/master/docs/rules/zero-unit.md
zero-unit: 2