forked from Pearson-Higher-Ed/elements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.sass-lint.yml
245 lines (193 loc) · 4.9 KB
/
.sass-lint.yml
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
rules:
# "border: 0" not "border: none"
border-zero: 2
# .foo {
# }
brace-style:
- 2
- style: 1tbs
allow-single-line: true
class-name-format:
- 1
- convention: ^([\.\%]?[a-z]*[-]?[a-z0-9\-]*)(\.[a-z0-9\-]*)?(__[a-z0-9]*[-]?[a-z0-9\-]*)?(--[a-z0-9]*[-]?[a-z0-9\-]*)?(\:[a-z]*)*$
# @import 'foo';
clean-import-paths:
- 1
- filename-extension: false
leading-underscore: false
# Nested blocks should include a space between last non-comment
# declaration:
# .foo {
# display: block;
#
# .bar {
# }
# }
empty-line-between-blocks: 1
# @extend should be written before declarations in a ruleset
extends-before-declarations: 1
# @extend should be written before mixins in a ruleset
extends-before-mixins: 1
# Files should end with a newline
final-newline:
- 1
- include: true
# Do not force element nesting
force-element-nesting: 0
# Do not forse pseudo element nesting
force-pseudo-nesting: 0
# Function name format:
# @function foo-bar()
function-name-format:
- 2
- convention: "^[a-z][a-zA-Z0-9\\-]+$"
# Disallow short hex definitions
hex-length:
- 2
- style: long
# Hex values should be lowercase
hex-notation:
- 1
- style: lowercase
# Indent with two spaces
indentation:
- 2
- size: 2
# Decimal numbers must include a leading 0
leading-zero:
- 2
- include: true
# Mixin name format:
# @mixin foo-bar()
mixin-name-format:
- 2
- convention: "^[a-z][a-zA-Z0-9\\-]+$"
# Allow mixins after declarations in a ruleset
mixins-before-declarations: 0
# Max nesting depth is 3
nesting-depth:
- 1
- max-depth: 3
# Should use hex color values rather than literals
no-color-keywords: 0
# Allow color literals as function arguments
no-color-literals: 0
# Allow CSS comments
no-css-comments: 0
# Disallow @debug statements
no-debug: 2
# Duplicate properties are not allowed within the same block
no-duplicate-properties: 1
# Disallow empty rulesets
no-empty-rulesets: 2
# Disallow id selectors
no-ids: 1
# Disallow !important
# no-important: 1
# Note: allowing !important until we can disable inline
# using comments.
# See https://github.com/sasstools/sass-lint/issues/70
no-important: 0
# Ensure hex values are valid
no-invalid-hex: 1
# Allow mergeable selectors
no-mergeable-selectors: 0
# Enforce correct spelling of CSS properties
no-misspelled-properties:
- 1
- extra-properties:
- text-size-adjust
- osx-font-smoothing
# Disallow qualifying elements:
# div.foo
# ul#foo
no-qualifying-elements:
- 2
- allow-element-with-attribute: false
allow-element-with-class: false
allow-element-with-id: false
# Disallow trailing zeroes
no-trailing-zero: 1
# Allow transition: all
no-transition-all: 0
# Allow protocols and domains in URLs
no-url-protocols: 0
# Disallow vendor prefixes
no-vendor-prefixes:
- 1
- excluded-identifiers:
- user-select
- appearance
- font-smoothing
# Not working
- webkit-font-smoothing
- moz-osx-font-smoothing
# Allow webkit and moz for now
- webkit
- moz
# Disallow placeholders in @extend
placeholder-in-extend: 2
# Placeholder name format
placeholder-name-format:
- 2
- convention: "^[a-z_][a-zA-Z0-9_\\-]+$"
# Ignore sort order
property-sort-order: 0
# Single quotes: @import 'foo';
quotes:
- 2
- style: single
# Values in shorthand form must be as concise as possible
shorthand-values: 2
# Selectors must be on a single line
single-line-per-selector: 2
# Disallow space after bang
space-after-bang:
- 2
- include: false
# Must have a space after colon
# Right: color: '#000000';
# Wrong: color:'#000000';
space-after-colon:
- 2
- include: true
# Must have a space after comma
# Right: rgb(0, 0, 0)
# Wrong: rgb(0,0,0)
space-after-comma: 2
# Must have a space before bang
# Right: content: 'foo' !important;
# Wrong: content: 'foo'!important;
space-before-bang:
- 2
- include: true
# Must have a space before brace
# Right: .foo {
# Wrong: .foo{
space-before-brace:
- 2
- include: true
# Disallow space before colon
# Right: content: 'foo'
# Wrong: content : 'foo'
space-before-colon:
- 2
- include: false
# Disallow space between parentheses
# Right: @function foo($bar)
# Wrong: @function foo( $bar )
space-between-parens:
- 2
- include: false
# All declarations must have a trailing semicolon
trailing-semicolon: 2
# url('example.com') not url(example.com)
url-quotes: 0
# Do not enforce use of variables for specified properties
variable-for-property: 0
# Variable name format: $foo-bar
variable-name-format:
- 2
- convention: "^[a-z][a-zA-Z0-9\\-]+$"
# Allow omitting units for 0 values
zero-unit: 0