提交 | 用户 | 时间
|
820397
|
1 |
module.exports = { |
H |
2 |
root: true, |
|
3 |
plugins: ['stylelint-order'], |
|
4 |
customSyntax: 'postcss-html', |
|
5 |
extends: ['stylelint-config-standard'], |
|
6 |
rules: { |
|
7 |
'selector-pseudo-class-no-unknown': [ |
|
8 |
true, |
|
9 |
{ |
|
10 |
ignorePseudoClasses: ['global', 'deep'] |
|
11 |
} |
|
12 |
], |
|
13 |
'at-rule-no-unknown': [ |
|
14 |
true, |
|
15 |
{ |
|
16 |
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin'] |
|
17 |
} |
|
18 |
], |
|
19 |
'media-query-no-invalid': null, |
|
20 |
'function-no-unknown': null, |
|
21 |
'no-empty-source': null, |
|
22 |
'named-grid-areas-no-invalid': null, |
|
23 |
'unicode-bom': 'never', |
|
24 |
'no-descending-specificity': null, |
|
25 |
'font-family-no-missing-generic-family-keyword': null, |
|
26 |
'declaration-colon-space-after': 'always-single-line', |
|
27 |
'declaration-colon-space-before': 'never', |
|
28 |
'declaration-block-trailing-semicolon': null, |
|
29 |
'rule-empty-line-before': [ |
|
30 |
'always', |
|
31 |
{ |
|
32 |
ignore: ['after-comment', 'first-nested'] |
|
33 |
} |
|
34 |
], |
|
35 |
'unit-no-unknown': [ |
|
36 |
true, |
|
37 |
{ |
|
38 |
ignoreUnits: ['rpx'] |
|
39 |
} |
|
40 |
], |
|
41 |
'order/order': [ |
|
42 |
[ |
|
43 |
'dollar-variables', |
|
44 |
'custom-properties', |
|
45 |
'at-rules', |
|
46 |
'declarations', |
|
47 |
{ |
|
48 |
type: 'at-rule', |
|
49 |
name: 'supports' |
|
50 |
}, |
|
51 |
{ |
|
52 |
type: 'at-rule', |
|
53 |
name: 'media' |
|
54 |
}, |
|
55 |
'rules' |
|
56 |
], |
|
57 |
{ |
|
58 |
severity: 'warning' |
|
59 |
} |
|
60 |
], |
|
61 |
// Specify the alphabetical order of the attributes in the declaration block |
|
62 |
'order/properties-order': [ |
|
63 |
'position', |
|
64 |
'top', |
|
65 |
'right', |
|
66 |
'bottom', |
|
67 |
'left', |
|
68 |
'z-index', |
|
69 |
'display', |
|
70 |
'float', |
|
71 |
'width', |
|
72 |
'height', |
|
73 |
'max-width', |
|
74 |
'max-height', |
|
75 |
'min-width', |
|
76 |
'min-height', |
|
77 |
'padding', |
|
78 |
'padding-top', |
|
79 |
'padding-right', |
|
80 |
'padding-bottom', |
|
81 |
'padding-left', |
|
82 |
'margin', |
|
83 |
'margin-top', |
|
84 |
'margin-right', |
|
85 |
'margin-bottom', |
|
86 |
'margin-left', |
|
87 |
'margin-collapse', |
|
88 |
'margin-top-collapse', |
|
89 |
'margin-right-collapse', |
|
90 |
'margin-bottom-collapse', |
|
91 |
'margin-left-collapse', |
|
92 |
'overflow', |
|
93 |
'overflow-x', |
|
94 |
'overflow-y', |
|
95 |
'clip', |
|
96 |
'clear', |
|
97 |
'font', |
|
98 |
'font-family', |
|
99 |
'font-size', |
|
100 |
'font-smoothing', |
|
101 |
'osx-font-smoothing', |
|
102 |
'font-style', |
|
103 |
'font-weight', |
|
104 |
'hyphens', |
|
105 |
'src', |
|
106 |
'line-height', |
|
107 |
'letter-spacing', |
|
108 |
'word-spacing', |
|
109 |
'color', |
|
110 |
'text-align', |
|
111 |
'text-decoration', |
|
112 |
'text-indent', |
|
113 |
'text-overflow', |
|
114 |
'text-rendering', |
|
115 |
'text-size-adjust', |
|
116 |
'text-shadow', |
|
117 |
'text-transform', |
|
118 |
'word-break', |
|
119 |
'word-wrap', |
|
120 |
'white-space', |
|
121 |
'vertical-align', |
|
122 |
'list-style', |
|
123 |
'list-style-type', |
|
124 |
'list-style-position', |
|
125 |
'list-style-image', |
|
126 |
'pointer-events', |
|
127 |
'cursor', |
|
128 |
'background', |
|
129 |
'background-attachment', |
|
130 |
'background-color', |
|
131 |
'background-image', |
|
132 |
'background-position', |
|
133 |
'background-repeat', |
|
134 |
'background-size', |
|
135 |
'border', |
|
136 |
'border-collapse', |
|
137 |
'border-top', |
|
138 |
'border-right', |
|
139 |
'border-bottom', |
|
140 |
'border-left', |
|
141 |
'border-color', |
|
142 |
'border-image', |
|
143 |
'border-top-color', |
|
144 |
'border-right-color', |
|
145 |
'border-bottom-color', |
|
146 |
'border-left-color', |
|
147 |
'border-spacing', |
|
148 |
'border-style', |
|
149 |
'border-top-style', |
|
150 |
'border-right-style', |
|
151 |
'border-bottom-style', |
|
152 |
'border-left-style', |
|
153 |
'border-width', |
|
154 |
'border-top-width', |
|
155 |
'border-right-width', |
|
156 |
'border-bottom-width', |
|
157 |
'border-left-width', |
|
158 |
'border-radius', |
|
159 |
'border-top-right-radius', |
|
160 |
'border-bottom-right-radius', |
|
161 |
'border-bottom-left-radius', |
|
162 |
'border-top-left-radius', |
|
163 |
'border-radius-topright', |
|
164 |
'border-radius-bottomright', |
|
165 |
'border-radius-bottomleft', |
|
166 |
'border-radius-topleft', |
|
167 |
'content', |
|
168 |
'quotes', |
|
169 |
'outline', |
|
170 |
'outline-offset', |
|
171 |
'opacity', |
|
172 |
'filter', |
|
173 |
'visibility', |
|
174 |
'size', |
|
175 |
'zoom', |
|
176 |
'transform', |
|
177 |
'box-align', |
|
178 |
'box-flex', |
|
179 |
'box-orient', |
|
180 |
'box-pack', |
|
181 |
'box-shadow', |
|
182 |
'box-sizing', |
|
183 |
'table-layout', |
|
184 |
'animation', |
|
185 |
'animation-delay', |
|
186 |
'animation-duration', |
|
187 |
'animation-iteration-count', |
|
188 |
'animation-name', |
|
189 |
'animation-play-state', |
|
190 |
'animation-timing-function', |
|
191 |
'animation-fill-mode', |
|
192 |
'transition', |
|
193 |
'transition-delay', |
|
194 |
'transition-duration', |
|
195 |
'transition-property', |
|
196 |
'transition-timing-function', |
|
197 |
'background-clip', |
|
198 |
'backface-visibility', |
|
199 |
'resize', |
|
200 |
'appearance', |
|
201 |
'user-select', |
|
202 |
'interpolation-mode', |
|
203 |
'direction', |
|
204 |
'marks', |
|
205 |
'page', |
|
206 |
'set-link-source', |
|
207 |
'unicode-bidi', |
|
208 |
'speak' |
|
209 |
] |
|
210 |
}, |
|
211 |
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'], |
|
212 |
overrides: [ |
|
213 |
{ |
|
214 |
files: ['*.vue', '**/*.vue', '*.html', '**/*.html'], |
|
215 |
extends: ['stylelint-config-recommended', 'stylelint-config-html'], |
|
216 |
rules: { |
|
217 |
'keyframes-name-pattern': null, |
|
218 |
'selector-class-pattern': null, |
|
219 |
'no-duplicate-selectors': null, |
|
220 |
'selector-pseudo-class-no-unknown': [ |
|
221 |
true, |
|
222 |
{ |
|
223 |
ignorePseudoClasses: ['deep', 'global'] |
|
224 |
} |
|
225 |
], |
|
226 |
'selector-pseudo-element-no-unknown': [ |
|
227 |
true, |
|
228 |
{ |
|
229 |
ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'] |
|
230 |
} |
|
231 |
] |
|
232 |
} |
|
233 |
} |
|
234 |
] |
|
235 |
} |