-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstylelint.config.js
79 lines (74 loc) · 1.96 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
/* global module */
module.exports = {
extends: 'stylelint-config-standard',
/* TODO: ignore non-css files until embedded css is fixed
https://github.com/stylelint/stylelint/issues/3219 */
ignoreFiles: ['./**/*.html', './**/*.md', './**/*.enex'],
rules: {
// [same as for js]
indentation: [2],
'max-line-length': 80,
'string-quotes': 'single',
// allow new lines between style props for groupings
'declaration-empty-line-before': null,
// allow empty rules to be able to set 'root' css modules class (which
// css rule can be empty) to root component element, so it can be found
// later in debugger
'block-no-empty': null,
'selector-pseudo-class-no-unknown': [
true,
{
// allow preudo-classes of css loader
ignorePseudoClasses: ['global', 'export']
}
],
'no-eol-whitespace': [
true,
{
// allow to indent empty lines
ignore: ['empty-lines']
}
],
'unit-blacklist': [
['px', 'em', 'rem'],
{
ignoreProperties: {
// px - for borders
px: [
'border',
'border-top',
'border-right',
'border-bottom',
'border-left',
'outline',
'stroke-width'
],
// em - for everything that should depend on element local font size
em: [
'/^padding/',
'/^margin/',
'line-height',
'border-radius',
'box-shadow',
'text-shadow'
],
// rem - for everything else
rem: [
'font-size',
'top',
'right',
'bottom',
'left',
'/^(max-|min-)?width/',
'/^(max-|min-)?height/',
'background-size',
'background-position'
]
},
ignoreMediaFeatureNames: {
px: ['/^(max-|min-)?width/']
}
}
]
}
};