-
Notifications
You must be signed in to change notification settings - Fork 0
/
.stylelintrc.yml
640 lines (639 loc) · 24 KB
/
.stylelintrc.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
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
extends:
- "stylelint-config-prettier"
plugins:
- "stylelint-order"
rules:
# ----------------------------------------------------------------------------------------------------------------------------
# Default Rules
# ----------------------------------------------------------------------------------------------------------------------------
# Specify a blacklist of disallowed at-rules.
at-rule-blacklist: ~
# Specify lowercase or uppercase for at-rules names (Autofixable).
at-rule-name-case: "lower"
# Require a newline after at-rule names.
at-rule-name-newline-after: ~
# Require a single space after at-rule names.
at-rule-name-space-after: "always"
# Disallow vendor prefixes for at-rules.
at-rule-no-vendor-prefix: true
# Disallow unknown at-rules.
at-rule-no-unknown: true
# Specify a requirelist of properties for an at-rule.
at-rule-property-requirelist: ~
# Require a newline after the semicolon of at-rules.
at-rule-semicolon-newline-after: "always"
# Require a single space or disallow whitespace before the semicolons of at rules.
at-rule-semicolon-space-before: "never"
# Specify a whitelist of allowed at-rules.
at-rule-whitelist: ~
# Require or disallow an empty line before the closing brace of blocks.
block-closing-brace-empty-line-before: "never"
# Require a newline or disallow whitespace after the closing brace of blocks.
block-closing-brace-newline-after: "always"
# Require a newline or disallow whitespace before the closing brace of blocks.
block-closing-brace-newline-before: "always-multi-line"
# Require a single space or disallow whitespace after the closing brace of blocks.
block-closing-brace-space-after: ~
# Require a single space or disallow whitespace before the closing brace of blocks.
block-closing-brace-space-before: "always-single-line"
# Disallow empty blocks.
block-no-empty: true
# Require a newline after the opening brace of blocks.
block-opening-brace-newline-after: "always-multi-line"
# Require a newline or disallow whitespace before the opening brace of blocks.
block-opening-brace-newline-before: ~
# Require a single space or disallow whitespace after the opening brace of blocks.
block-opening-brace-space-after: "always-single-line"
# Require a single space or disallow whitespace before the opening brace of blocks.
block-opening-brace-space-before: "always"
# Specify lowercase or uppercase for hex colors (Autofixable).
color-hex-case: "lower"
# Specify short or long notation for hex colors (Autofixable).
color-hex-length: "long"
# Require (where possible) or disallow named colors.
color-named: "never"
# Disallow hex colors.
color-no-hex: true
# Disallow invalid hex colors.
color-no-invalid-hex: true
# Require or disallow an empty line before comments (Autofixable).
comment-empty-line-before: ~
# Disallow empty comments.
comment-no-empty: true
# Require or disallow whitespace on the inside of comment markers.
comment-whitespace-inside: "always"
# Specify a blacklist of disallowed words within comments.
comment-word-blacklist: ~
# Specify a pattern for custom media query names.
custom-media-pattern: ~
# Require or disallow an empty line before custom properties (Autofixable).
custom-property-empty-line-before: "never"
# Specify a pattern for custom properties.
custom-property-pattern: "^([a-z][a-z0-9]*)(\\-[a-z0-9]+)*$"
# Require a single space or disallow whitespace after the bang of declarations.
declaration-bang-space-after: "never"
# Require a single space or disallow whitespace before the bang of declarations.
declaration-bang-space-before: "always"
# Disallow duplicate properties within declaration blocks.
declaration-block-no-duplicate-properties:
- true
- ignore: ["consecutive-duplicates-with-different-values"]
# Disallow longhand properties that can be combined into one shorthand property.
declaration-block-no-redundant-longhand-properties:
- true
- ignoreShorthands:
- "animation"
- "background"
- "flex"
- "font"
- "grid"
- "list-style"
- "transition"
# Disallow shorthand properties that override related longhand properties within declaration blocks.
declaration-block-no-shorthand-property-overrides: true
# Require a newline or disallow whitespace after the semicolons of declaration blocks.
declaration-block-semicolon-newline-after: ~
# Require a newline or disallow whitespace before the semicolons of declaration blocks.
declaration-block-semicolon-newline-before: "never-multi-line"
# Require a single space or disallow whitespace after the semicolons of declaration blocks.
declaration-block-semicolon-space-after: "always-single-line"
# Require a single space or disallow whitespace before the semicolons of declaration blocks.
declaration-block-semicolon-space-before: "never"
# Limit the number of declaration within single line declaration blocks.
declaration-block-single-line-max-declarations: 0
# Require or disallow a trailing semicolon within declaration blocks.
declaration-block-trailing-semicolon: "always"
# Require a newline or disallow whitespace after the colon of declarations.
declaration-colon-newline-after: "always-multi-line"
# Require a single space or disallow whitespace after the colon of declarations.
declaration-colon-space-after: "always-single-line"
# Require a single space or disallow whitespace before the colon of declarations.
declaration-colon-space-before: "never"
# Require or disallow an empty line before declarations (Autofixable).
declaration-empty-line-before: ~
# Disallow !important within declarations.
declaration-no-important: true
# Specify a blacklist of disallowed property and unit pairs within declarations.
declaration-property-unit-disallowed-list:
font-size: ["%", "vh"]
# Specify a whitelist of allowed property and unit pairs within declarations.
declaration-property-unit-whitelist: ~
# Specify a blacklist of disallowed property and value pairs within declarations.
declaration-property-value-blacklist: ~
# Specify a whitelist of allowed property and value pairs within declarations.
declaration-property-value-whitelist: ~
# Specify whether or not quotation marks should be used around font family names.
font-family-name-quotes: "always-unless-keyword"
# Require numeric or named (where possible) font-weight values.
font-weight-notation: "named-where-possible"
# Disallow duplicate font family names.
font-family-no-duplicate-names: true
# Disallow missing generic families in lists of font family names.
font-family-no-missing-generic-family-keyword: true
# Specify a blacklist of disallowed functions.
function-blacklist: ~
# Disallow an invalid expression within calc functions.
function-calc-no-invalid: ~ # Cannot use calc(-1 * var(--xxx))
# Disallow an unspaced operator within `calc` functions.
function-calc-no-unspaced-operator: true
# Require a newline or disallow whitespace after the commas of functions.
function-comma-newline-after: "never-multi-line"
# Require a newline or disallow whitespace before the commas of functions.
function-comma-newline-before: "never-multi-line"
# Require a single space or disallow whitespace after the commas of functions.
function-comma-space-after: "always"
# Require a single space or disallow whitespace before the commas of functions.
function-comma-space-before: "never"
# Disallow direction values in `linear-gradient()` calls that are not valid according to the standard syntax.
function-linear-gradient-no-nonstandard-direction: true
# Limit the number of adjacent empty lines within functions.
function-max-empty-lines: 0
# Specify lowercase or uppercase for function names.
function-name-case: "lower"
# Require a newline or disallow whitespace on the inside of the parentheses of functions.
function-parentheses-newline-inside: "never-multi-line"
# Require a single space or disallow whitespace on the inside of the parentheses of functions.
function-parentheses-space-inside: "never"
# Disallow scheme-relative urls.
function-url-no-scheme-relative: true
# Specify a blacklist of disallowed url schemes.
function-url-scheme-disallowed-list:
- "ftp"
- "/^http/"
# Specify a whitelist of allowed url schemes.
function-url-scheme-whitelist: ~
# Require or disallow quotes for urls.
function-url-quotes: "always"
# Specify a whitelist of allowed functions.
function-whitelist: ~
# Require or disallow whitespace after functions.
function-whitespace-after: "always"
# Specify indentation (Autofixable).
indentation: 2
# Disallow `!important` within keyframe declarations.
keyframe-declaration-no-important: true
# Disallow units for zero lengths (Autofixable).
length-zero-no-unit:
- true
- ignore:
- "custom-properties"
# Specify unix or windows linebreaks.
linebreaks: "unix"
# Limit the number of adjacent empty lines.
max-empty-lines: 1
# Limit the length of a line.
max-line-length: 128
# Limit the depth of nesting.
max-nesting-depth: 3
# Require a single space or disallow whitespace after the colon in media features.
media-feature-colon-space-after: "always"
# Require a single space or disallow whitespace before the colon in media features.
media-feature-colon-space-before: "never"
# Specify a blacklist of disallowed media feature names.
media-feature-name-blacklist: ~
# Specify lowercase or uppercase for media feature names.
media-feature-name-case: "lower"
# Disallow vendor prefixes for media feature names.
media-feature-name-no-vendor-prefix: ~
# Disallow unknown media feature names.
media-feature-name-no-unknown: true
# Specify a whitelist of allowed media feature name and value pairs.
media-feature-name-value-whitelist: ~
# Specify a whitelist of allowed media feature names.
media-feature-name-whitelist: ~
# Require a single space or disallow whitespace on the inside of the parentheses within media features.
media-feature-parentheses-space-inside: "never"
# Require a single space or disallow whitespace after the range operator in media features.
media-feature-range-operator-space-after: "always"
# Require a single space or disallow whitespace before the range operator in media features.
media-feature-range-operator-space-before: "always"
# Require a newline or disallow whitespace after the commas of media query lists.
media-query-list-comma-newline-after: "never-multi-line"
# Require a newline or disallow whitespace before the commas of media query lists.
media-query-list-comma-newline-before: "never-multi-line"
# Require a single space or disallow whitespace after the commas of media query lists.
media-query-list-comma-space-after: "always"
# Require a single space or disallow whitespace before the commas of media query lists.
media-query-list-comma-space-before: "never"
# Disallow selectors of lower specificity from coming after overriding selectors of higher specificity.
no-descending-specificity: true
# Disallow duplicate `@import` rules within a stylesheet.
no-duplicate-at-import-rules: true
# Disallow duplicate selectors.
no-duplicate-selectors: true
# Disallow empty first lines.
no-empty-first-line: true
# Disallow empty sources.
no-empty-source: true
# Disallow end-of-line whitespace.
no-eol-whitespace: true
# Disallow extra semicolons.
no-extra-semicolons: true
# Disallow double-slash comments ( `//...` ) which are not supported by CSS.
no-invalid-double-slash-comments: true
# Disallow unknown animations.
no-unknown-animations: true
# Require or disallow a leading zero for fractional numbers less than 1 (Autofixable).
number-leading-zero: "always"
# Limit the number of decimal places allowed in numbers.
number-max-precision: 2
# Disallow trailing zeros in numbers (Autofixable).
number-no-trailing-zeros: ~
# Specify lowercase or uppercase for properties.
property-case: "lower"
# Specify a blacklist of disallowed properties.
property-disallowed-list:
- "grid-gap"
- "grid-column-gap"
- "grid-row-gap"
- "animation"
- "background"
- "flex"
- "font"
- "word-wrap"
- "grid"
- "list-style"
- "transition"
# Disallow unknown properties.
property-no-unknown: true
# Disallow vendor prefixes for properties.
property-no-vendor-prefix: ~
# Specify a whitelist of allowed properties.
property-whitelist: ~
# Require or disallow an empty line before rules (Autofixable).
rule-empty-line-before: ~
# Require a single space or disallow whitespace on the inside of the brackets within attribute selectors.
selector-attribute-brackets-space-inside: "never"
# Specify a blacklist of disallowed attribute operators.
selector-attribute-operator-blacklist: ~
# Require a single space or disallow whitespace after operators within attribute selectors.
selector-attribute-operator-space-after: "never"
# Require a single space or disallow whitespace before operators within attribute selectors.
selector-attribute-operator-space-before: "never"
# Specify a whitelist of allowed attribute operators.
selector-attribute-operator-whitelist: ~
# Require or disallow quotes for attribute values.
selector-attribute-quotes: "always"
# Specify a pattern for class selectors.
selector-class-pattern: ~ # Recommended to use kebab-case but ti is impossible to access from JS
# Specify a blacklist of disallowed combinators.
selector-combinator-blacklist: ~
# Require a single space or disallow whitespace after the combinators of selectors.
selector-combinator-space-after: "always"
# Require a single space or disallow whitespace before the combinators of selectors.
selector-combinator-space-before: "always"
# Specify a whitelist of allowed combinators.
selector-combinator-whitelist: ~
# Disallow non-space characters for descendant combinators of selectors.
selector-descendant-combinator-no-non-space: true
# Specify a pattern for id selectors.
selector-id-pattern: "^spec-up$"
# Require a newline or disallow whitespace after the commas of selector lists.
selector-list-comma-newline-after: "always-multi-line"
# Require a newline or disallow whitespace before the commas of selector lists.
selector-list-comma-newline-before: "never-multi-line"
# Require a single space or disallow whitespace after the commas of selector lists.
selector-list-comma-space-after: "always-single-line"
# Require a single space or disallow whitespace before the commas of selector lists.
selector-list-comma-space-before: "never"
# Limit the number of attribute selectors in a selector.
selector-max-attribute: 1
# Limit the number of classes in a selector.
selector-max-class: 4
# Limit the number of combinators in a selector.
selector-max-combinators: 4
# Limit the number of compound selectors in a selector.
selector-max-compound-selectors: 5
# Limit the number of adjacent empty lines within selectors.
selector-max-empty-lines: 0
# Limit the number of id selectors in a selector.
selector-max-id: 1
# Limit the specificity of selectors.
selector-max-specificity: ~
# Limit the number of type in a selector.
selector-max-type: 4
# Limit the number of universal selectors in a selector.
selector-max-universal: 1
# Specify a pattern for the selectors of rules nested within rules.
selector-nested-pattern: ~
# Disallow qualifying a selector by type.
selector-no-qualifying-type: ~
# Disallow vendor prefixes for selectors.
selector-no-vendor-prefix: true
# Specify a blacklist of disallowed pseudo-class selectors.
selector-pseudo-class-blacklist: ~
# Specify lowercase or uppercase for pseudo-class selectors.
selector-pseudo-class-case: "lower"
# Disallow unknown pseudo-class selectors.
selector-pseudo-class-no-unknown:
- true
- { ignorePseudoClasses: ["global"] }
# Require a single space or disallow whitespace on the inside of the parentheses within pseudo-class selectors.
selector-pseudo-class-parentheses-space-inside: "never"
# Specify a whitelist of allowed pseudo-class selectors.
selector-pseudo-class-whitelist: ~
# Specify a blacklist of disallowed pseudo-element selectors.
selector-pseudo-element-blacklist: ~
# Specify lowercase or uppercase for pseudo-element selectors.
selector-pseudo-element-case: "lower"
# Specify single or double colon notation for applicable pseudo-elements.
selector-pseudo-element-colon-notation: "double"
# Disallow unknown pseudo-element selectors.
selector-pseudo-element-no-unknown: true
# Specify a whitelist of allowed pseudo-element selectors.
selector-pseudo-element-whitelist: ~
# Specify lowercase or uppercase for type selector.
selector-type-case: "lower"
# Disallow unknown type selectors.
selector-type-no-unknown: true
# Disallow redundant values in shorthand properties (Autofixable).
shorthand-property-no-redundant-values: true
# Disallow (unescaped) newlines in strings.
string-no-newline: true
# Specify single or double quotes around strings (Autofixable).
string-quotes: "double"
# Specify the minimum number of milliseconds for time values.
time-min-milliseconds: 10
# Specify a whitelist of allowed units.
unit-allowed-list:
- ["px", "vw", "vh", "%", "em"]
- ignoreProperties:
em:
- "margin"
- "margin-top"
- "margin-right"
- "margin-bottom"
- "margin-left"
- "padding"
- "padding-top"
- "padding-right"
- "padding-bottom"
- "padding-left"
- "height"
- "min-height"
- "font-size"
- "letter-spacing"
- "text-indent"
- "/^\\-\\-/"
ms:
- "animation-duration"
- "animation-delay"
- "transition-duration"
- "transition-delay"
- "/^\\-\\-/"
deg:
- "background-image"
- "transform"
- "/^\\-\\-/"
fr:
- "/^grid\\-/"
# Specify lowercase or uppercase for units.
unit-case: "lower"
# Specify a blacklist of disallowed units.
unit-disallowed-list: "unit"
# Disallow unknown units.
unit-no-unknown: true
# Specify lowercase or uppercase for keywords values.
value-keyword-case: ~
# Require a newline or disallow whitespace after the commas of value lists.
value-list-comma-newline-after: "never-multi-line"
# Require a newline or disallow whitespace before the commas of value lists.
value-list-comma-newline-before: "never-multi-line"
# Require a single space or disallow whitespace after the commas of value lists.
value-list-comma-space-after: "always"
# Require a single space or disallow whitespace before the commas of value lists.
value-list-comma-space-before: "never"
# Limit the number of adjacent empty lines within value lists.
value-list-max-empty-lines: 0
# Disallow vendor prefixes for values.
value-no-vendor-prefix: true
# ----------------------------------------------------------------------------------------------------------------------------
# stylelint-order
# ----------------------------------------------------------------------------------------------------------------------------
# For more detail, https://github.com/hudochenkov/stylelint-order .
# ----------------------------------------------------------------------------------------------------------------------------
"order/order":
- - "custom-properties"
- "declarations"
- "rules"
- "at-rules"
- unspecified: "bottom"
"order/properties-order":
- "display"
- "grid"
- "grid-column"
- "grid-row"
- "grid-area"
- "grid-template"
- "grid-template-columns"
- "grid-template-rows"
- "grid-template-areas"
- "grid-auto-flow"
- "grid-auto-columns"
- "grid-auto-rows"
- "flex"
- "flex-grow"
- "flex-shrink"
- "justify-self"
- "align-self"
- "flex-basis"
- "flex-direction"
- "order"
- "flex-order"
- "flex-wrap"
- "flex-flow"
- "justify-content"
- "align-items"
- "align-content"
- "flex-pack"
- "flex-align"
- "float"
- "clear"
- "box-sizing"
- "box-decoration-break"
- "box-shadow"
- "position"
- "top"
- "right"
- "bottom"
- "left"
- "z-index"
- "margin"
- "margin-top"
- "margin-right"
- "margin-bottom"
- "margin-left"
- "padding"
- "padding-top"
- "padding-right"
- "padding-bottom"
- "padding-left"
- "width"
- "min-width"
- "max-width"
- "height"
- "min-height"
- "max-height"
- "overflow"
- "overflow-x"
- "overflow-y"
- "vertical-align"
- "list-style"
- "list-style-position"
- "list-style-type"
- "list-style-image"
- "columns"
- "column-span"
- "column-width"
- "column-fill"
- "column-gap"
- "column-rule"
- "column-rule-width"
- "column-rule-style"
- "column-rule-color"
- "row-gap"
- "color"
- "font"
- "font-family"
- "font-size"
- "font-size-adjust"
- "font-stretch"
- "font-weight"
- "font-style"
- "font-variant"
- "word-spacing"
- "word-wrap"
- "word-break"
- "white-space"
- "tab-size"
- "hyphens"
- "src"
- "line-height"
- "letter-spacing"
- "overflow-wrap"
- "text-align"
- "text-align-last"
- "text-decoration"
- "text-emphasis"
- "text-emphasis-position"
- "text-emphasis-style"
- "text-emphasis-color"
- "text-indent"
- "text-justify"
- "text-outline"
- "text-transform"
- "text-wrap"
- "text-overflow"
- "text-overflow-ellipsis"
- "text-overflow-mode"
- "text-shadow"
- "border"
- "border-spacing"
- "border-collapse"
- "border-width"
- "border-style"
- "border-color"
- "border-top"
- "border-top-width"
- "border-top-style"
- "border-top-color"
- "border-right"
- "border-right-width"
- "border-right-style"
- "border-right-color"
- "border-bottom"
- "border-bottom-width"
- "border-bottom-style"
- "border-bottom-color"
- "border-left"
- "border-left-width"
- "border-left-style"
- "border-left-color"
- "border-radius"
- "border-top-left-radius"
- "border-top-right-radius"
- "border-bottom-right-radius"
- "border-bottom-left-radius"
- "border-image"
- "border-image-source"
- "border-image-slice"
- "border-image-width"
- "border-image-outset"
- "border-image-repeat"
- "border-top-image"
- "border-right-image"
- "border-bottom-image"
- "border-left-image"
- "border-corner-image"
- "border-top-left-image"
- "border-top-right-image"
- "border-bottom-right-image"
- "border-bottom-left-image"
- "background"
- "background-color"
- "background-image"
- "background-attachment"
- "background-position"
- "background-position-x"
- "background-position-y"
- "background-repeat"
- "background-clip"
- "background-origin"
- "background-size"
- "clip"
- "filter"
- "mix-blend-mode"
- "outline"
- "outline-width"
- "outline-style"
- "outline-color"
- "outline-offset"
- "table-layout"
- "caption-side"
- "empty-cells"
- "quotes"
- "content"
- "counter-increment"
- "counter-reset"
- "opacity"
- "visibility"
- "filter"
- "resize"
- "cursor"
- "nav-index"
- "nav-up"
- "nav-right"
- "nav-down"
- "nav-left"
- "transition"
- "transition-property"
- "transition-duration"
- "transition-delay"
- "transition-timing-function"
- "transform"
- "transform-origin"
- "animation"
- "animation-name"
- "animation-duration"
- "animation-play-state"
- "animation-timing-function"
- "animation-delay"
- "animation-iteration-count"
- "animation-direction"
- "animation-fill-mode"
- "pointer-events"
- "unicode-bidi"
- "direction"
- "break-before"
- "break-inside"
- "break-after"
- "page-break-before"
- "page-break-inside"
- "page-break-after"
- "orphans"
- "widows"
- "zoom"
- "max-zoom"
- "min-zoom"
- "user-zoom"
- "orientation"