forked from MMF-FE/svgicon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.stylelintrc.js
125 lines (124 loc) · 3.43 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
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
/**
* stylelint 配置
*/
module.exports = {
ignoreFiles: ['node_modules/**/*.scss', 'dist/**/*.css', '**/*.tsx'],
extends: 'stylelint-config-standard',
plugins: ['stylelint-order'],
rules: {
'color-hex-case': 'upper',
'color-hex-length': null,
'max-empty-lines': 1,
indentation: 4,
// 字符串使用双引号
'string-quotes': 'double',
// 使用了 autoprefix 不需要前缀
'property-no-vendor-prefix': true,
'selector-type-no-unknown': null,
'selector-pseudo-element-colon-notation': null,
'selector-pseudo-class-no-unknown': null,
'number-leading-zero': null,
'at-rule-no-unknown': null,
'font-family-no-missing-generic-family-keyword': null,
'no-descending-specificity': null,
'unit-no-unknown': [
true,
{
ignoreUnits: ['rpx'],
},
],
// 属性顺序
'property-no-unknown': [
true,
{
ignoreProperties: ['composes'],
},
],
'selector-pseudo-element-no-unknown': [
true,
{
ignorePseudoElements: ['v-deep'],
},
],
// 属性顺序
'order/order': [
'dollar-variables',
'custom-properties',
'at-rules',
'declarations',
'rules',
],
'order/properties-order': [
'display',
'float',
'position',
{
order: 'flexible',
properties: ['left', 'top', 'right', 'bottom'],
},
'width',
'height',
{
order: 'flexible',
properties: [
'min-width',
'max-width',
'min-height',
'max-height',
'line-height',
],
},
'padding',
{
order: 'flexible',
properties: [
'padding-left',
'padding-top',
'padding-right',
'padding-bottom',
],
},
'margin',
{
order: 'flexible',
properties: [
'margin-left',
'margin-top',
'margin-right',
'margin-bottom',
],
},
'border',
{
order: 'flexible',
properties: [
'border-left',
'border-top',
'border-right',
'border-bottom',
'border-radius',
],
},
'background',
{
order: 'flexible',
properties: [
'background-image',
'background-position',
'background-repeat',
'background-size',
'background-color',
],
},
'color',
{
order: 'flexible',
properties: ['font-weight', 'font-size'],
},
{
order: 'flexible',
properties: ['text-align'],
},
],
},
}