-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstylelint.config.js
45 lines (45 loc) · 1.66 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
module.exports = {
plugins: ['stylelint-declaration-strict-value'],
processors: ['stylelint-processor-styled-components'],
extends: [
'stylelint-config-standard',
'stylelint-config-prettier',
'stylelint-config-styled-components',
],
rules: {
/*
* These rules are here to prevent CSS bad practices.
* Most of the time they introduce tech debt, checkout the links above each rule for more info.
* When some of these rules are not relevant (there are rare edge cases), you can
* // stylelint-disable-next-line
* Check with a member of the CSS guild if you have any doubt
*/
// https://github.com/theodo/theodo-code-principles/blob/master/css.md#no-important
'declaration-no-important': true,
// https://github.com/theodo/theodo-code-principles/blob/master/css.md#no-id-in-selectors
'selector-max-id': 0,
// https://github.com/theodo/theodo-code-principles/blob/master/css.md#no-more-than-two-classes-in-selectors
'selector-max-class': 2,
// https://github.com/theodo/theodo-code-principles/blob/master/css.md#no-html-tags-in-selectors
'selector-max-type': 2,
// https://github.com/theodo/theodo-code-principles/blob/master/css.md#no-hardcoded-values
'scale-unlimited/declaration-strict-value': [
[
'font-size',
'line-height',
'z-index',
'color',
'background-color',
'border-color',
'border-top-color',
'border-right-color',
'border-bottom-color',
'border-left-color',
'fill',
],
{
ignoreKeywords: ['transparent', 'inherit', 'initial', 'unset', 'none', 'currentColor'],
},
],
},
};