Skip to content

Commit c4b8ee2

Browse files
committed
Update SCSS linting
1 parent 5059b2f commit c4b8ee2

File tree

3 files changed

+67
-16
lines changed

3 files changed

+67
-16
lines changed

.scss-lint.yml

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,26 @@
22

33
scss_files: "**/*.scss"
44

5+
# Default severity of all linters.
6+
severity: warning
7+
58
linters:
69
BangFormat:
710
enabled: true
811
space_before_bang: true
912
space_after_bang: false
1013

14+
BemDepth:
15+
enabled: false
16+
max_elements: 1
17+
1118
BorderZero:
1219
enabled: true
1320
convention: zero # or `none`
1421

22+
ChainedClasses:
23+
enabled: false
24+
1525
ColorKeyword:
1626
enabled: true
1727

@@ -20,13 +30,17 @@ linters:
2030

2131
Comment:
2232
enabled: true
33+
style: silent
2334

2435
DebugStatement:
2536
enabled: true
2637

2738
DeclarationOrder:
2839
enabled: true
2940

41+
DisableLinterReason:
42+
enabled: false
43+
3044
DuplicateProperty:
3145
enabled: true
3246

@@ -41,6 +55,9 @@ linters:
4155
EmptyRule:
4256
enabled: true
4357

58+
ExtendDirective:
59+
enabled: false
60+
4461
FinalNewline:
4562
enabled: true
4663
present: true
@@ -84,14 +101,15 @@ linters:
84101
NameFormat:
85102
enabled: true
86103
allow_leading_underscore: true
87-
convention: hyphenated_lowercase # or 'BEM', or a regex pattern
104+
convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern
88105

89106
NestingDepth:
90107
enabled: true
91108
max_depth: 3
109+
ignore_parent_selectors: false
92110

93111
PlaceholderInExtend:
94-
enabled: true
112+
enabled: false
95113

96114
PropertyCount:
97115
enabled: false
@@ -101,16 +119,34 @@ linters:
101119
PropertySortOrder:
102120
enabled: true
103121
ignore_unspecified: false
122+
min_properties: 2
104123
separate_groups: false
105-
order: recess # use Twitter's sort order
124+
order: concentric # use Twitter's sort order
106125

107126
PropertySpelling:
108127
enabled: true
109128
extra_properties: []
129+
disabled_properties: []
130+
131+
PropertyUnits:
132+
enabled: true
133+
global: [
134+
'ch', 'em', 'ex', 'rem', # Font-relative lengths
135+
'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths
136+
'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths
137+
'deg', 'grad', 'rad', 'turn', # Angle
138+
'ms', 's', # Duration
139+
'Hz', 'kHz', # Frequency
140+
'dpi', 'dpcm', 'dppx', # Resolution
141+
'%'] # Other
142+
properties: {}
143+
144+
PseudoElement:
145+
enabled: true
110146

111147
QualifyingElement:
112148
enabled: true
113-
allow_element_with_attribute: true
149+
allow_element_with_attribute: false
114150
allow_element_with_class: false
115151
allow_element_with_id: false
116152

@@ -120,20 +156,22 @@ linters:
120156

121157
SelectorFormat:
122158
enabled: true
123-
convention: hyphenated_lowercase # or 'BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern
159+
convention: hyphenated_lowercase # or 'strict_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern
124160

125161
Shorthand:
126162
enabled: true
163+
allowed_shorthands: [1, 2, 3, 4]
127164

128165
SingleLinePerProperty:
129166
enabled: true
130167
allow_single_line_rule_sets: true
131168

132169
SingleLinePerSelector:
133-
enabled: true
170+
enabled: false
134171

135172
SpaceAfterComma:
136173
enabled: true
174+
style: one_space # or 'no_space', or 'at_least_one_space'
137175

138176
SpaceAfterPropertyColon:
139177
enabled: true
@@ -142,10 +180,17 @@ linters:
142180
SpaceAfterPropertyName:
143181
enabled: true
144182

183+
SpaceAfterVariableName:
184+
enabled: true
185+
186+
SpaceAroundOperator:
187+
enabled: true
188+
style: one_space # or 'at_least_one_space', or 'no_space'
189+
145190
SpaceBeforeBrace:
146191
enabled: true
147192
style: space # or 'new_line'
148-
allow_single_line_padding: false
193+
allow_single_line_padding: true
149194

150195
SpaceBetweenParens:
151196
enabled: true
@@ -158,9 +203,15 @@ linters:
158203
TrailingSemicolon:
159204
enabled: true
160205

206+
TrailingWhitespace:
207+
enabled: true
208+
161209
TrailingZero:
162210
enabled: false
163211

212+
TransitionAll:
213+
enabled: false
214+
164215
UnnecessaryMantissa:
165216
enabled: true
166217

@@ -177,11 +228,11 @@ linters:
177228
enabled: false
178229
properties: []
179230

180-
VendorPrefixes:
231+
VendorPrefix:
181232
enabled: true
182233
identifier_list: base
183-
include: []
184-
exclude: []
234+
additional_identifiers: []
235+
excluded_identifiers: []
185236

186237
ZeroUnit:
187238
enabled: true

src/less/react-checkbox-tree.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
font-size: 16px;
66

77
ol {
8-
padding-left: 0;
98
margin: 0;
9+
padding-left: 0;
1010
list-style-type: none;
1111

1212
ol {
@@ -24,8 +24,8 @@
2424
}
2525

2626
.fa {
27-
width: 14px;
2827
margin: 0 5px;
28+
width: 14px;
2929
}
3030

3131
.fa-folder-open-o,
@@ -45,8 +45,8 @@
4545

4646
.fa-chevron-right,
4747
.fa-chevron-down {
48-
text-align: center;
4948
cursor: pointer;
49+
text-align: center;
5050
}
5151

5252
> .fa-chevron-right {

src/sass/react-checkbox-tree.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ $rct-label-hover: rgba($rct-icon-color, .1) !default;
55
font-size: 16px;
66

77
ol {
8-
padding-left: 0;
98
margin: 0;
9+
padding-left: 0;
1010
list-style-type: none;
1111

1212
ol {
@@ -24,8 +24,8 @@ $rct-label-hover: rgba($rct-icon-color, .1) !default;
2424
}
2525

2626
.fa {
27-
width: 14px;
2827
margin: 0 5px;
28+
width: 14px;
2929
}
3030

3131
.fa-folder-open-o,
@@ -45,8 +45,8 @@ $rct-label-hover: rgba($rct-icon-color, .1) !default;
4545

4646
.fa-chevron-right,
4747
.fa-chevron-down {
48-
text-align: center;
4948
cursor: pointer;
49+
text-align: center;
5050
}
5151

5252
> .fa-chevron-right {

0 commit comments

Comments
 (0)