-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstylelint.config.js
195 lines (195 loc) · 5.1 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
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
/* https://stylelint.io/user-guide/rules/selector-class-pattern/ */
module.exports = {
root: true,
plugins: ['stylelint-order', 'stylelint-scss'],
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
syntax: 'scss',
rules: {
/* 禁止使用未知规则 */
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'mix', 'use', 'forward', 'at-root']
}
],
'function-no-unknown': null,
'annotation-no-unknown': null,
'selector-class-pattern': null,
'declaration-block-no-redundant-longhand-properties': null,
/* 禁止空来源。*/
'no-empty-source': null,
/* 禁止使用无效的命名网格区域。*/
'named-grid-areas-no-invalid': null,
/* 要求或不允许使用Unicode字节顺序标记。*/
'unicode-bom': 'never',
/* 禁止较低特异性的选择器在覆盖较高特异性的选择器之后出现。*/
'no-descending-specificity': null,
/* 禁止在字体系列名称列表中缺少通用系列。*/
'font-family-no-missing-generic-family-keyword': null,
/* 在声明的冒号后面需要一个空格或禁止空格。*/
'declaration-colon-space-after': 'always-single-line',
/* 在声明的冒号之前需要一个空格或禁止使用空格。*/
'declaration-colon-space-before': 'never',
/* 在声明块内要求或不允许尾随分号。*/
'declaration-block-trailing-semicolon': 'always',
/* 在规则之前要求或禁止使用空行。*/
'rule-empty-line-before': [
'always',
{
ignore: ['after-comment', 'first-nested']
}
],
/* 禁止使用未知单位。*/
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
/* 样式顺序*/
'order/properties-order': [
'position',
'top',
'right',
'bottom',
'left',
'z-index',
'display',
'float',
'width',
'height',
'max-width',
'max-height',
'min-width',
'min-height',
'padding',
'padding-top',
'padding-right',
'padding-bottom',
'padding-left',
'margin',
'margin-top',
'margin-right',
'margin-bottom',
'margin-left',
'margin-collapse',
'margin-top-collapse',
'margin-right-collapse',
'margin-bottom-collapse',
'margin-left-collapse',
'overflow',
'overflow-x',
'overflow-y',
'clip',
'clear',
'font',
'font-family',
'font-size',
'font-smoothing',
'osx-font-smoothing',
'font-style',
'font-weight',
'hyphens',
'src',
'line-height',
'letter-spacing',
'word-spacing',
'color',
'text-align',
'text-decoration',
'text-indent',
'text-overflow',
'text-rendering',
'text-size-adjust',
'text-shadow',
'text-transform',
'word-break',
'word-wrap',
'white-space',
'vertical-align',
'list-style',
'list-style-type',
'list-style-position',
'list-style-image',
'pointer-events',
'cursor',
'background',
'background-attachment',
'background-color',
'background-image',
'background-position',
'background-repeat',
'background-size',
'border',
'border-collapse',
'border-top',
'border-right',
'border-bottom',
'border-left',
'border-color',
'border-image',
'border-top-color',
'border-right-color',
'border-bottom-color',
'border-left-color',
'border-spacing',
'border-style',
'border-top-style',
'border-right-style',
'border-bottom-style',
'border-left-style',
'border-width',
'border-top-width',
'border-right-width',
'border-bottom-width',
'border-left-width',
'border-radius',
'border-top-right-radius',
'border-bottom-right-radius',
'border-bottom-left-radius',
'border-top-left-radius',
'border-radius-topright',
'border-radius-bottomright',
'border-radius-bottomleft',
'border-radius-topleft',
'content',
'quotes',
'outline',
'outline-offset',
'opacity',
'filter',
'visibility',
'size',
'zoom',
'transform',
'box-align',
'box-flex',
'box-orient',
'box-pack',
'box-shadow',
'box-sizing',
'table-layout',
'animation',
'animation-delay',
'animation-duration',
'animation-iteration-count',
'animation-name',
'animation-play-state',
'animation-timing-function',
'animation-fill-mode',
'transition',
'transition-delay',
'transition-duration',
'transition-property',
'transition-timing-function',
'background-clip',
'backface-visibility',
'resize',
'appearance',
'user-select',
'interpolation-mode',
'direction',
'marks',
'page',
'set-link-source',
'unicode-bidi',
'speak'
]
},
ignoreFiles: ['**./*.js,', '**./*.ts,', '**./*.tsx,', '**./*.jsx,', '**./*.vue,']
};