-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.sass-lint.yml
307 lines (232 loc) · 8.36 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# Lint project Sass files via Sass-Lint.
# More info - https://github.com/sasstools/sass-lint.
# More info - https://github.com/sasstools/grunt-sass-lint.
options:
# Don't merge default rules.
merge-default-rules: false
# Set the formatter.
formatter: stylish
files:
include: '**/*.s+(a|c)ss'
rules:
# Enforce the use of the use of quotes in attribute values.
attribute-quotes: 1
# Enforce how many elements a BEM selector can contain.
bem-depth:
- 1
- max-depth: 1
# Enforce whether one should use 0 or none when specifying a zero `border` value.
border-zero: 1
# Enforce the use of the chosen brace style.
brace-style:
- 1
- style: '1tbs' # options: '1tbs', 'stroustrup', 'allman'
allow-single-line: true
# Enforce a convention for class names.
class-name-format:
- 1
- allow-leading-underscore: false
convention: hyphenatedlowercase
ignore: [
'error_message',
'comments_error'
]
# Enforce whether or not `@import` paths should have leading underscores and/or filename extensions.
clean-import-paths: 1
# Enforce that declarations should be written before nesting in a ruleset.
declarations-before-nesting: 1
# Enforce whether or not parenthesis should be included if no arguments are defined or used, when declaring or invoking a mixin.
empty-args: 1
# Enforce whether or not nested blocks should include a space between the last non-comment declaration or not.
empty-line-between-blocks: 1
# Enforce that extends should be written before declarations in a ruleset.
extends-before-declarations: 1
# Enforce that extends should be written before mixins in a ruleset.
extends-before-mixins: 1
# Enforce whether or not files should end with a newline.
final-newline:
- 1
- include: true
# Enforce the nesting of attributes.
force-attribute-nesting: 0
# Enforce the nesting of elements.
force-element-nesting: 0
# Enforce the nesting of pseudo elements/classes.
force-pseudo-nesting: 0
# Enforce a convention for function names.
function-name-format:
- 1
- allow-leading-underscore: false
convention: hyphenatedlowercase
# Enforce the length of hexadecimal values.
hex-length:
- 1
- style: long
# Enforce the case of hexadecimal values.
hex-notation:
- 1
- style: lowercase
# Enforce a convention for ids.
id-name-format:
- 1
- allow-leading-underscore: false
convention: hyphenatedlowercase
# Enforce an indentation size (in spaces) and ensure that tabs and spaces are not mixed.
indentation:
- 1
- size: 4
# Enforce whether or not decimal numbers should include a leading zero.
leading-zero:
- 1
- include: true
# Enforce that a file's length doesn't exceed a certain number of lines.
max-file-line-count: 0
# Enforce that lines do not exceed a max length/limit.
max-line-length: 0
# Enforce a convention for mixin names.
mixin-name-format:
- 1
- allow-leading-underscore: false
convention: hyphenatedlowercase
# Enforce that mixins should be written before declarations in a ruleset.
mixins-before-declarations: 1
# Enforce how deeply a selector can be nested.
nesting-depth:
- 1
- max-depth: 4
# Disallow the use of attribute selectors.
no-attribute-selectors: 0
# Disallow the use of hexadecimal colors.
no-color-hex: 0
# Enforce the use of hexadecimal color values rather than literals.
no-color-keywords: 1
# Disallow the use of color literals and basic color functions in any declarations other than variables or maps/lists.
no-color-literals: 0
# Disallow the use of combinators.
no-combinators: 0
# Enforce the use of Sass single-line comments and disallow CSS comments.
no-css-comments: 0
# Enforce that `@debug` statements are not allowed to be used.
no-debug: 1
# Disallow the use of certain properties.
no-disallowed-properties: 0
# Enforce that duplicate properties are not allowed within the same block.
no-duplicate-properties: 0
# Enforce that rulesets are not empty.
no-empty-rulesets: 1
# Enforce that ID selectors are not allowed to be used.
no-ids: 0
# Enforce that important declarations are not allowed to be used.
no-important: 0
# Enforce that only valid of hexadecimal values are written.
no-invalid-hex: 1
# Enforce that selectors aren't repeated and that their properties are merged.
no-mergeable-selectors: 0
# Enforce the correct spelling of CSS properties and prevent the use of unknown CSS properties.
no-misspelled-properties:
- 1
- extra-properties:
- text-decoration-skip
- touch-callout
# Enforce that selectors are not allowed to have qualifying elements.
no-qualifying-elements:
- 1
- allow-element-with-attribute: true
allow-element-with-class: true
allow-element-with-id: false
# Enforce that trailing zeros are not allowed.
no-trailing-zero: 0
# Enforce whether the keyword all can be used with the `transition` or `transition-property` property.
no-transition-all: 1
# Disallow the use of `*` (universal) selectors.
no-universal-selectors: 0
# Enforce that domains are not used within URLs.
no-url-domains: 1
# Enforce that protocols and domains are not used within URLs.
no-url-protocols: 1
# Enforce that vendor prefixes are not allowed to be used.
no-vendor-prefixes: 0
# Enforce that `@warn` statements are not allowed to be used.
no-warn: 1
# Enforce that new declarations must begin on new lines.
one-declaration-per-line: 1
# Enforce whether extends should only include placeholder selectors.
placeholder-in-extend: 1
# Enforce a convention for placeholder names.
placeholder-name-format:
- 1
- allow-leading-underscore: false
convention: hyphenatedlowercase
# Enforce the order in which declarations are written.
property-sort-order:
- 1
- order: 'smacss' # options: 'alphabetical', 'concentric', 'recess', 'smacss', or [array of properties].
# Disallow the use of units not specified in global or per-property. Units specified per-property will override the global units for that property.
property-units:
- 1
- global: [
'cm',
'em',
'pt',
'px',
'rem',
'vh'
]
per-property: {
animation: ['s'],
transition: ['s']
}
# Enforce that pseudo-elements must start with double colons, pseudo-classes must start with single colon.
pseudo-element: 1
# Enforce whether single quotes or double quotes should be used for all strings.
quotes:
- 1
- style: double
# Enforce that values in their shorthand form are as concise as specified.
shorthand-values:
- 1
- allowed-shorthands:
- 1
- 2
- 3
# Enforce whether selectors should be placed on a new line.
single-line-per-selector: 1
# Enforce whether or not a space should be included after a bang `!`.
space-after-bang:
- 1
- include: false
# Enforce whether or not a space should be included after a colon `:`.
space-after-colon:
- 1
- include: true
# Enforce whether or not a space should be included after a comma `,`.
space-after-comma: 1
# Enforce whether or not a single space should be included before and after the following operators: +, -, /, *, %, <, > ==, !=, <= and >=.
space-around-operator: 1
# Enforce whether or not a space should be included before a bang `!`.
space-before-bang:
- 1
- include: true
# Enforce whether or not a space should be included before a brace `{`.
space-before-brace:
- 1
- include: true
# Enforce whether or not a space should be included before a colon `:`.
space-before-colon: 1
# Enforce whether or not a space should be included before the first item and after the last item inside parenthesis `()`.
space-between-parens:
- 1
- include: false
# Enforce whether the last declaration in a block should include a semicolon `;` or not (.sass syntax excluded).
trailing-semicolon: 1
# Enforce that URLs are wrapped in quotes.
url-quotes: 1
# Enforce the use of variables for the values of specified properties.
variable-for-property: 0
# Enforce a convention for variable names.
variable-name-format:
- 1
- allow-leading-underscore: false
convention: hyphenatedlowercase
# Enforce whether or not values of `0` used for length should be unitless.
zero-unit: 1