-
Notifications
You must be signed in to change notification settings - Fork 0
/
stylelintrc.js
118 lines (116 loc) · 3.4 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/* eslint-disable quote-props */
module.exports = {
rules: {
/* --- Original rules --- */
'at-rule-empty-line-before': [
'always',
{
ignoreAtRules: [
'else',
],
ignore: [
'after-comment',
'first-nested',
'blockless-after-same-name-blockless',
],
},
],
'at-rule-no-unknown': null,
'at-rule-no-vendor-prefix': true,
'comment-empty-line-before': null,
'declaration-no-important': true,
'declaration-empty-line-before': [
'always',
{
ignore: [
'after-comment',
'after-declaration',
'first-nested',
'inside-single-line-block',
],
},
],
'font-family-name-quotes': 'always-where-recommended',
'font-weight-notation': 'named-where-possible',
'function-url-quotes': 'always',
'media-feature-name-no-vendor-prefix': true,
'no-duplicate-selectors': true,
'property-no-vendor-prefix': true,
'selector-attribute-quotes': 'always',
'selector-max-id': 0,
'selector-no-vendor-prefix': true,
'selector-type-no-unknown': null,
'value-no-vendor-prefix': true,
'scss/at-else-closing-brace-newline-after': 'always-last-in-chain',
'scss/at-else-closing-brace-space-after': 'always-intermediate',
'scss/at-else-empty-line-before': 'never',
'scss/at-if-closing-brace-newline-after': 'always-last-in-chain',
'scss/at-if-closing-brace-space-after': 'always-intermediate',
'scss/at-rule-no-unknown': true,
/* --- Rules for Stylelint 14+ --- */
// The three values notation is confusing.
'shorthand-property-no-redundant-values': null,
// Complains about rgba(black, 50%) for example, a Scss function.
'color-function-notation': null,
// Complains about file patterns like toast.vars.scss.
'scss/at-import-partial-extension': null,
// Prefer consistency.
'scss/at-mixin-argumentless-call-parentheses': null,
// Prefer flexibility / readability.
'scss/double-slash-comment-empty-line-before': null,
'scss/dollar-variable-empty-line-before': null,
//
'value-keyword-case': [
'lower',
{
camelCaseSvgKeywords: true, // currentColor
}],
// customary usage for these identifiers. Using a--b-c and a__b--c-d and similar.
'custom-property-pattern': [
'^([a-z][a-z0-9]*)(--?[a-z0-9]+)*$',
{
message: 'Expected custom property name to be kebab-case',
},
],
'keyframes-name-pattern': [
'^([a-z][a-z0-9]*)(--?[a-z0-9]+)*$',
{
message: 'Expected keyframe name to be kebab-case',
},
],
'selector-class-pattern': [
'^([a-z][a-z0-9]*)((--?|__)[a-z0-9]+)*$',
{
resolveNestedSelectors: true,
message: 'Expected class selector to be kebab_mixed-case',
},
],
'scss/at-mixin-pattern': [
'^(-?_?[a-z][a-z0-9]*)(--?[a-z0-9]+)*$',
{
message: 'Expected mixin name to be kebab-case',
},
],
'scss/dollar-variable-pattern': [
'^(-?[a-z][a-z0-9]*)((--?|__)[a-z0-9]+)*$',
{
message: 'Expected variable to be kebab_mixed-case',
},
],
/* --- Rules for Stylelint-Stylistic (Stylint 15+'s deprecations) --- */
'stylistic/block-closing-brace-newline-after': [
'always',
{
ignoreAtRules: [
'if',
'else',
],
},
],
'stylistic/declaration-colon-space-after': 'always',
'stylistic/indentation': 'tab',
// Default is 120, standard is 160.
'stylistic/max-line-length': 160,
'stylistic/string-quotes': 'single',
},
};