-
Notifications
You must be signed in to change notification settings - Fork 0
/
.stylelintrc.js
94 lines (67 loc) · 3.48 KB
/
.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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
module.exports = {
extends: ['stylelint-config-rational-order'],
plugins: ['stylelint-scss', 'stylelint-order'],
rules: {
// https://stylelint.io/user-guide/rules/number-leading-zero
'number-leading-zero': 'always',
// https://stylelint.io/user-guide/rules/string-quotes
'string-quotes': 'single',
// https://stylelint.io/user-guide/rules/selector-attribute-quotes
'selector-attribute-quotes': 'always',
// https://stylelint.io/user-guide/rules/selector-combinator-space-after
'selector-combinator-space-after': 'always',
// https://stylelint.io/user-guide/rules/declaration-block-trailing-semicolon
'declaration-block-trailing-semicolon': 'always',
// https://stylelint.io/user-guide/rules/selector-max-id
'selector-max-id': 0,
// https://stylelint.io/user-guide/rules/selector-list-comma-newline-after
'selector-list-comma-newline-after': 'always',
// https://stylelint.io/user-guide/rules/rule-empty-line-before
'rule-empty-line-before': ['always', { ignore: ['after-comment'] }],
// https://stylelint.io/user-guide/rules/comment-empty-line-before
'comment-empty-line-before': ['always', { except: ['first-nested'] }],
// https://stylelint.io/user-guide/rules/block-opening-brace-space-before
'block-opening-brace-space-before': 'always',
// https://stylelint.io/user-guide/rules/declaration-colon-space-after
'declaration-colon-space-after': 'always',
// https://stylelint.io/user-guide/rules/declaration-colon-space-before
'declaration-colon-space-before': 'never',
// https://stylelint.io/user-guide/rules/declaration-block-single-line-max-declarations
'declaration-block-single-line-max-declarations': 1,
// https://stylelint.io/user-guide/rules/function-url-quotes
'function-url-quotes': 'always',
// https://stylelint.io/user-guide/rules/declaration-property-value-blacklist
'declaration-property-value-blacklist': { '/^border/': ['none'] },
// https://stylelint.io/user-guide/rules/at-rule-empty-line-before
'at-rule-empty-line-before': ['always', { ignore: ['after-comment'], except: ['first-nested'] }],
// https://stylelint.io/user-guide/rules/max-nesting-depth
'max-nesting-depth': 10,
// https://stylelint.io/user-guide/rules/media-feature-colon-space-after
'media-feature-colon-space-after': 'always',
// https://stylelint.io/user-guide/rules/media-feature-colon-space-before
'media-feature-colon-space-before': 'never',
// https://stylelint.io/user-guide/rules/media-feature-parentheses-space-inside
'media-feature-parentheses-space-inside': 'never',
// https://stylelint.io/user-guide/rules/color-hex-case
'color-hex-case': 'lower',
// https://stylelint.io/user-guide/rules/color-hex-length
'color-hex-length': 'short',
// https://github.com/hudochenkov/stylelint-order/tree/master/rules/order
'order/order': [
[],
{
disableFix: true,
},
],
// rules for styled-components support
// https://github.com/styled-components/stylelint-config-styled-components
// https://stylelint.io/user-guide/rules/value-no-vendor-prefix
'value-no-vendor-prefix': true,
// https://stylelint.io/user-guide/rules/property-no-vendor-prefix
'property-no-vendor-prefix': true,
// https://stylelint.io/user-guide/rules/no-empty-source
'no-empty-source': null,
// https://stylelint.io/user-guide/rules/no-missing-end-of-source-newline
'no-missing-end-of-source-newline': null,
},
}