-
Notifications
You must be signed in to change notification settings - Fork 0
/
.stylelintrc.js
40 lines (34 loc) · 1001 Bytes
/
.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
const { rules } = require('stylelint-config-clean-order');
const [propertiesOrder, options] = rules['order/properties-order'];
const propertiesOrderWithEmptyLineBefore = propertiesOrder.map(properties => ({
...properties,
emptyLineBefore: 'always',
}));
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-clean-order'],
customSyntax: 'postcss-styled-syntax',
rules: {
'declaration-property-unit-allowed-list': {
'/^border/': ['px', '%'],
'/^padding|^gap|^margin|^font/': ['%', 'rem', 'em'],
},
'unit-allowed-list': ['%', 'deg', 'px', 'rem', 'ms', 'vw', 'vh', 's'],
'order/order': [
'custom-properties',
'dollar-variables',
'at-variables',
'declarations',
'rules',
'at-rules',
'less-mixins',
],
'order/properties-order': [
propertiesOrderWithEmptyLineBefore,
{
...options,
severity: 'error',
},
],
'property-no-vendor-prefix': null,
},
};