UNPKG

9.59 kBJavaScriptView Raw
1module.exports = {
2 extends: 'stylelint-config-sass-guidelines',
3 plugins: [
4 'stylelint-no-unsupported-browser-features',
5 'stylelint-at-rule-no-children',
6 'stylelint-declaration-block-no-ignored-properties',
7 'stylelint-selector-tag-no-without-class'
8 ],
9 rules: {
10 'at-rule-empty-line-before': [
11 'always',
12 {
13 except: [
14 'blockless-after-same-name-blockless',
15 'first-nested'
16 ],
17 ignore: [
18 'after-comment'
19 ]
20 }
21 ],
22 'block-closing-brace-empty-line-before': 'never',
23 'block-opening-brace-newline-after': 'always',
24 'color-hex-length': 'long',
25 'comment-empty-line-before': 'always',
26 'comment-no-empty': true,
27 'font-family-name-quotes': 'always-unless-keyword',
28 'font-family-no-missing-generic-family-keyword': true,
29 'max-nesting-depth': 3,
30 'max-empty-lines': 1,
31 'media-feature-name-no-unknown': true,
32 'no-duplicate-at-import-rules': true,
33 'no-duplicate-selectors': true,
34 'no-empty-source': true,
35 'no-extra-semicolons': true,
36 'no-invalid-double-slash-comments': true,
37 'property-case': 'lower',
38 'plugin/declaration-block-no-ignored-properties': true,
39 'plugin/no-unsupported-browser-features': [
40 true,
41 {
42 browsers: [
43 '> 3%',
44 'not dead',
45 'not OperaMini all'
46 ]
47 }
48 ],
49 'plugin/selector-tag-no-without-class': [
50 'div',
51 'span'
52 ],
53 'unit-case': 'lower',
54 'unit-no-unknown': true,
55 'value-keyword-case': 'lower',
56 'value-list-comma-space-after': 'always-single-line',
57 'selector-max-id': 1,
58 'selector-class-pattern': [
59 '^[a-z0-9\\-_]+$',
60 {
61 message: 'Selector should be written in lowercase with hyphens (selector-class-pattern)'
62 }
63 ],
64 'order/properties-alphabetical-order': null,
65 'order/properties-order': [
66 [
67 {
68 properties: [
69 'display',
70 'visibility'
71 ]
72 },
73 {
74 properties: [
75 'position',
76 'z-index',
77 'top',
78 'right',
79 'bottom',
80 'left'
81 ]
82 },
83 {
84 properties: [
85 'box-sizing'
86 ]
87 },
88 {
89 properties: [
90 'grid',
91 'grid-after',
92 'grid-area',
93 'grid-auto-columns',
94 'grid-auto-flow',
95 'grid-auto-rows',
96 'grid-before',
97 'grid-column',
98 'grid-column-end',
99 'grid-column-gap',
100 'grid-column-start',
101 'grid-columns',
102 'grid-end',
103 'grid-gap',
104 'grid-row',
105 'grid-row-end',
106 'grid-row-gap',
107 'grid-row-start',
108 'grid-rows',
109 'grid-start',
110 'grid-template',
111 'grid-template-areas',
112 'grid-template-columns',
113 'grid-template-rows'
114 ]
115 },
116 {
117 properties: [
118 'flex',
119 'flex-basis',
120 'flex-direction',
121 'flex-flow',
122 'flex-grow',
123 'flex-shrink',
124 'flex-wrap',
125 'align-content',
126 'align-items',
127 'align-self',
128 'justify-content',
129 'order'
130 ]
131 },
132 {
133 properties: [
134 'width',
135 'min-width',
136 'max-width'
137 ]
138 },
139 {
140 properties: [
141 'height',
142 'min-height',
143 'max-height'
144 ]
145 },
146 {
147 properties: [
148 'margin',
149 'margin-top',
150 'margin-right',
151 'margin-bottom',
152 'margin-left'
153 ]
154 },
155 {
156 properties: [
157 'padding',
158 'padding-top',
159 'padding-right',
160 'padding-bottom',
161 'padding-left'
162 ]
163 },
164 {
165 properties: [
166 'float',
167 'clear'
168 ]
169 },
170 {
171 properties: [
172 'overflow',
173 'overflow-x',
174 'overflow-y'
175 ]
176 },
177 {
178 properties: [
179 'clip',
180 'zoom'
181 ]
182 },
183 {
184 properties: [
185 'columns',
186 'column-gap',
187 'column-fill',
188 'column-rule',
189 'column-span',
190 'column-count',
191 'column-width'
192 ]
193 },
194 {
195 properties: [
196 'table-layout',
197 'empty-cells',
198 'caption-side',
199 'border-spacing',
200 'border-collapse',
201 'list-style',
202 'list-style-position',
203 'list-style-type',
204 'list-style-image'
205 ]
206 },
207 {
208 properties: [
209 'transform',
210 'transform-box',
211 'transform-origin',
212 'transform-style',
213 'backface-visibility',
214 'perspective',
215 'perspective-origin'
216 ]
217 },
218 {
219 properties: [
220 'transition',
221 'transition-property',
222 'transition-duration',
223 'transition-timing-function',
224 'transition-delay'
225 ]
226 },
227 {
228 properties: [
229 'animation',
230 'animation-name',
231 'animation-duration',
232 'animation-play-state',
233 'animation-timing-function',
234 'animation-delay',
235 'animation-iteration-count',
236 'animation-direction'
237 ]
238 },
239 {
240 properties: [
241 'border',
242 'border-top',
243 'border-right',
244 'border-bottom',
245 'border-left',
246 'border-width',
247 'border-top-width',
248 'border-right-width',
249 'border-bottom-width',
250 'border-left-width'
251 ]
252 },
253 {
254 properties: [
255 'border-style',
256 'border-top-style',
257 'border-right-style',
258 'border-bottom-style',
259 'border-left-style'
260 ]
261 },
262 {
263 properties: [
264 'border-radius',
265 'border-top-left-radius',
266 'border-top-right-radius',
267 'border-bottom-right-radius',
268 'border-bottom-left-radius'
269 ]
270 },
271 {
272 properties: [
273 'border-color',
274 'border-top-color',
275 'border-right-color',
276 'border-bottom-color',
277 'border-left-color'
278 ]
279 },
280 {
281 properties: [
282 'stroke-width',
283 'stroke-linecap',
284 'stroke-dasharray',
285 'stroke-dashoffset',
286 'stroke'
287 ]
288 },
289 {
290 properties: [
291 'opacity'
292 ]
293 },
294 {
295 properties: [
296 'background',
297 'background-attachment',
298 'background-clip',
299 'background-color',
300 'background-image',
301 'background-repeat',
302 'background-position',
303 'background-size',
304 'box-shadow',
305 'fill'
306 ]
307 },
308 {
309 properties: [
310 'color'
311 ]
312 },
313 {
314 properties: [
315 'font',
316 'font-family',
317 'font-size',
318 'font-size-adjust',
319 'font-smoothing',
320 'font-stretch',
321 'font-style',
322 'font-variant',
323 'font-weight'
324 ]
325 },
326 {
327 properties: [
328 'font-emphasize',
329 'font-emphasize-position',
330 'font-emphasize-style'
331 ]
332 },
333 {
334 properties: [
335 'letter-spacing',
336 'line-height',
337 'list-style'
338 ]
339 },
340 {
341 properties: [
342 'text-align',
343 'text-align-last',
344 'text-decoration',
345 'text-decoration-color',
346 'text-decoration-line',
347 'text-decoration-style',
348 'text-indent',
349 'text-justify',
350 'text-overflow',
351 'text-overflow-ellipsis',
352 'text-overflow-mode',
353 'text-rendering',
354 'text-outline',
355 'text-shadow',
356 'text-transform',
357 'text-wrap',
358 'word-wrap',
359 'word-break'
360 ]
361 },
362 {
363 properties: [
364 'text-emphasis',
365 'text-emphasis-color',
366 'text-emphasis-style',
367 'text-emphasis-position'
368 ]
369 },
370 {
371 properties: [
372 'vertical-align',
373 'white-space',
374 'word-spacing',
375 'hyphens'
376 ]
377 },
378 {
379 properties: [
380 'src'
381 ]
382 },
383 {
384 properties: [
385 'tab-size',
386 'counter-reset',
387 'counter-increment',
388 'resize',
389 'cursor',
390 'pointer-events',
391 'speak',
392 'user-select',
393 'nav-index',
394 'nav-up',
395 'nav-right',
396 'nav-down',
397 'nav-left'
398 ]
399 }
400 ],
401 {
402 unspecified: 'bottomAlphabetical'
403 }
404 ]
405 }
406};