-
Notifications
You must be signed in to change notification settings - Fork 0
/
.stylelintrc.js
72 lines (59 loc) · 2.19 KB
/
.stylelintrc.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
const bemClass = /^([a-z0-9\\-]{2,})(__[a-z0-9\\-]{2,})?(--[a-z0-9\\-]{2,})?$/;
module.exports = {
plugins: ["stylelint-scss", "stylelint-prettier"],
customSyntax: "postcss-scss",
rules: {
"prettier/prettier": true,
// General / Sheet
"no-duplicate-at-import-rules": true,
"no-duplicate-selectors": true,
"selector-max-universal": 0,
"max-nesting-depth": 4,
"scss/at-import-no-partial-leading-underscore": true,
// Declaration block
"declaration-block-no-duplicate-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
// Selector
"selector-class-pattern": [bemClass, { resolveNestedSelectors: true }],
"selector-pseudo-class-no-unknown": [
true,
{
ignorePseudoClasses: "global",
},
],
"selector-pseudo-element-no-unknown": true,
"selector-type-no-unknown": true,
"selector-no-vendor-prefix": true,
"selector-pseudo-element-colon-notation": "single",
"scss/selector-no-redundant-nesting-selector": true,
// Media
"media-feature-name-no-unknown": true,
"media-feature-name-no-vendor-prefix": true,
// At-rule
"scss/at-rule-no-unknown": true,
"at-rule-no-vendor-prefix": true,
// Properties
"property-no-unknown": true,
"shorthand-property-no-redundant-values": true,
// Values
"number-max-precision": 4,
"value-no-vendor-prefix": true,
"unit-no-unknown": true,
"number-leading-zero": "always",
"number-no-trailing-zeros": true,
"length-zero-no-unit": true,
// Colors
"color-no-invalid-hex": true,
// Fonts
"font-family-no-duplicate-names": true,
"font-family-no-missing-generic-family-keyword": true,
"font-family-name-quotes": "always-unless-keyword",
// Function
"function-linear-gradient-no-nonstandard-direction": true,
// 'function-calc-no-invalid': true,
// Comment
"comment-no-empty": true,
// Operators
"scss/operator-no-unspaced": true,
},
};