-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstylelint.config.js
81 lines (75 loc) · 2.85 KB
/
stylelint.config.js
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
/**
* Copyright 2017-present Palantir Technologies
* @license Apache-2.0
*/
"use strict";
// lowercase-single-dashed-names-only-0
const namingPattern = /^-?[a-z0-9]+(-[a-z0-9]+)*$/;
module.exports = {
extends: ["stylelint-config-standard", "stylelint-config-recess-order"],
// export namingPattern so it can be used in your own rules
namingPattern,
plugins: [
"stylelint-scss",
"stylelint-order",
"stylelint-declaration-use-variable"
],
rules: {
"at-rule-no-unknown": false,
"at-rule-no-vendor-prefix": true,
"block-opening-brace-space-before": "always-multi-line",
"color-hex-length": "long",
"color-no-hex": true,
"color-named": "never",
"declaration-block-no-duplicate-properties": true,
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-colon-newline-after": null,
"declaration-colon-space-after": "always-single-line",
"declaration-empty-line-before": ["never", {
ignore: ["after-declaration"],
}],
"declaration-no-important": true,
"font-family-name-quotes": "always-unless-keyword",
"font-weight-notation": "numeric",
"function-max-empty-lines": 1,
"function-url-quotes": "always",
"function-allowed-list": ["rem", "rgba", "gray", "brand-colors", "brand-tints-1", "brand-tints-2"],
"indentation": false,
"length-zero-no-unit": true,
"max-empty-lines": 3,
"max-line-length": 100,
"max-nesting-depth": 4,
"media-feature-name-no-vendor-prefix": true,
"no-descending-specificity": null,
"no-duplicate-selectors": true,
"no-unknown-animations": true,
"number-max-precision": 8,
"number-no-trailing-zeros": true,
"property-no-unknown": true,
"property-no-vendor-prefix": true,
"rule-empty-line-before": ["always-multi-line", {
except: ["first-nested"],
ignore: ["after-comment"],
}],
"selector-attribute-quotes": "always",
"selector-class-pattern": namingPattern,
"selector-id-pattern": namingPattern,
"selector-max-compound-selectors": 4,
// "id,class,type"
"selector-max-specificity": "1,3,3",
"selector-max-id": 0,
"selector-max-universal": 0,
"selector-no-vendor-prefix": true,
"selector-pseudo-class-no-unknown": [true, {
// :global is used by css modules
"ignorePseudoClasses": ["global"]
}],
"string-quotes": "double",
"time-min-milliseconds": 100,
"unit-blacklist": ["pt"],
"value-keyword-case": "lower",
"value-list-comma-newline-before": "never-multi-line",
"value-no-vendor-prefix": true,
},
};