Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit ff30167

Browse files
committed
Add SCSS Linter
1 parent 9a0d175 commit ff30167

1 file changed

Lines changed: 370 additions & 0 deletions

File tree

css/.scss-lint.yml

Lines changed: 370 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,370 @@
1+
exclude: [
2+
".git/**",
3+
"node_modules/**",
4+
"bower_components/**"
5+
]
6+
7+
# Default application configuration that all configurations inherit from.
8+
linters:
9+
# Prefer border: 0 over border: none?
10+
BorderZero:
11+
enabled: true
12+
13+
# Should selectors be all lowercase?
14+
CapitalizationInSelector:
15+
enabled: true
16+
17+
# Prefer hexadecimal color codes over color keywords?
18+
ColorKeyword:
19+
enabled: true
20+
21+
# Prefer // comments over /* ... */?
22+
Comment:
23+
enabled: true
24+
25+
# Report @debug statements?
26+
DebugStatement:
27+
enabled: true
28+
29+
# In rulesets, order by: @extend, properties, nested rule sets?
30+
DeclarationOrder:
31+
enabled: true
32+
33+
# Report the same property twice in a single rule set?
34+
DuplicateProperty:
35+
enabled: true
36+
37+
# Lint position of @else statements?
38+
# Configure: `same_line` or `new_line`.
39+
ElsePlacement:
40+
enabled: true
41+
style: same_line
42+
43+
# Require a blank line between rule, function, and mixin declarations?
44+
# Ignore blocks spanning a single line only?
45+
EmptyLineBetweenBlocks:
46+
enabled: true
47+
ignore_single_line_blocks: true
48+
49+
# Report empty rulesets?
50+
EmptyRule:
51+
enabled: false
52+
53+
# Lint end-of-file newline?
54+
# Configure: must be present?
55+
FinalNewline:
56+
enabled: true
57+
present: true
58+
59+
# Lint hex color length?
60+
# Configure: `short` or `long`
61+
HexLength:
62+
enabled: true
63+
style: short
64+
65+
# Lint case of hex colors?
66+
# Configure: `lowercase` or `uppercase`.
67+
HexNotation:
68+
enabled: true
69+
style: lowercase
70+
71+
# Report invalid hexadecimal colors?
72+
HexValidation:
73+
enabled: true
74+
75+
# Report selectors chained on id?
76+
IdWithExtraneousSelector:
77+
enabled: true
78+
79+
# Use soft tabs?
80+
# Configure: number of spaces per indent.
81+
Indentation:
82+
enabled: true
83+
width: 4
84+
85+
# Lint leading zero on dimension values?
86+
# Configure: `exclude_zero` or `include_zero`
87+
LeadingZero:
88+
enabled: true
89+
style: include_zero
90+
91+
# Report same selector used twice in a single stylesheet?
92+
MergeableSelector:
93+
enabled: true
94+
force_nesting: false
95+
96+
# Lint format for variable, mixin and function names?
97+
# Configure: `hyphenated_lowercase`, a regex pattern or `BEM`.
98+
#
99+
# Note that the `BEM` value refers to the original Yandex BEM convention
100+
# (http://bem.info/method/definitions/).
101+
NameFormat:
102+
enabled: true
103+
convention: hyphenated_lowercase
104+
105+
# Report @extend unless extending a placeholder?
106+
PlaceholderInExtend:
107+
enabled: true
108+
109+
# Report unknown CSS properties? (Ignores vendor prefixes.)
110+
PropertySpelling:
111+
enabled: true
112+
extra_properties: []
113+
114+
# Lint selector depth?
115+
# Configure: number of levels (number of combinators + 1), e.g.
116+
# `ul > li > a` is 3 levels.
117+
SelectorDepth:
118+
enabled: true
119+
max_depth: 3
120+
121+
# Prefer the shortest possible shorthand?
122+
Shorthand:
123+
enabled: true
124+
125+
# Report more than one selector per line?
126+
SingleLinePerSelector:
127+
enabled: true
128+
129+
# Report lack of space after commas in lists?
130+
SpaceAfterComma:
131+
enabled: true
132+
133+
# Report presence of whitespace between property name and colon?
134+
SpaceAfterPropertyName:
135+
enabled: true
136+
137+
# Lint whitespace between property colon and value?
138+
# Configure: `no_space`, `at_least_one_space`, or `aligned`
139+
SpaceAfterPropertyColon:
140+
enabled: true
141+
style: one_space
142+
143+
# Report lack of space between selector and opening brace?
144+
SpaceBeforeBrace:
145+
enabled: true
146+
allow_single_line_padding: false
147+
148+
# Lint whitespace padding within parens?
149+
# Configure: number of spaces
150+
SpaceBetweenParens:
151+
enabled: true
152+
spaces: 0
153+
154+
# Lint quote marks for all strings?
155+
# Configure: `single_quotes` or `double_quotes`
156+
StringQuotes:
157+
enabled: true
158+
style: single_quotes
159+
160+
# Report lack of semicolon at the end of the last rule in a ruleset?
161+
TrailingSemicolonAfterPropertyValue:
162+
enabled: true
163+
164+
# Report numeric values with unnecessary fractional portions?
165+
UnnecessaryMantissa:
166+
enabled: true
167+
168+
# Report urls containing a protocol or domain?
169+
UrlFormat:
170+
enabled: true
171+
172+
# Report urls without quotes?
173+
UrlQuotes:
174+
enabled: true
175+
176+
# Report units on zero values?
177+
ZeroUnit:
178+
enabled: true
179+
180+
# Use Compass linters?
181+
Compass::*:
182+
enabled: false
183+
184+
# Lint the declaration order of properties?
185+
# Configure: array of properties
186+
PropertySortOrder:
187+
enabled: true
188+
order: [
189+
# Content and counters
190+
"content",
191+
"quotes",
192+
"counter-reset",
193+
"counter-increment",
194+
195+
# Positioning
196+
"position",
197+
"top",
198+
"right",
199+
"bottom",
200+
"left",
201+
"z-index",
202+
203+
# Display, layout modes & box model
204+
"display",
205+
"overflow",
206+
"overflow-x",
207+
"overflow-y",
208+
"clip",
209+
"float",
210+
"clear",
211+
"table-layout",
212+
"empty-cells",
213+
"caption-side",
214+
"border-spacing",
215+
"border-collapse",
216+
"flex-flow",
217+
"flex-direction",
218+
"flex-wrap",
219+
"justify-content",
220+
"align-items",
221+
"align-content",
222+
"flex",
223+
"flex-grow",
224+
"flex-shrink",
225+
"flex-basis",
226+
"align-self",
227+
"order",
228+
"box-sizing",
229+
"width",
230+
"min-width",
231+
"max-width",
232+
"height",
233+
"min-height",
234+
"max-height",
235+
"margin",
236+
"margin-top",
237+
"margin-right",
238+
"margin-bottom",
239+
"margin-left",
240+
"padding",
241+
"padding-top",
242+
"padding-right",
243+
"padding-bottom",
244+
"padding-left",
245+
"border",
246+
"border-width",
247+
"border-style",
248+
"border-color",
249+
"border-top",
250+
"border-top-width",
251+
"border-top-style",
252+
"border-top-color",
253+
"border-right",
254+
"border-right-width",
255+
"border-right-style",
256+
"border-right-color",
257+
"border-bottom",
258+
"border-bottom-width",
259+
"border-bottom-style",
260+
"border-bottom-color",
261+
"border-left",
262+
"border-left-width",
263+
"border-left-style",
264+
"border-left-color",
265+
266+
# Visual styles
267+
"visibility",
268+
"opacity",
269+
"border-radius",
270+
"border-top-left-radius",
271+
"border-top-right-radius",
272+
"border-bottom-right-radius",
273+
"border-bottom-left-radius",
274+
"border-image",
275+
"border-image-source",
276+
"border-image-slice",
277+
"border-image-width",
278+
"border-image-outset",
279+
"border-image-repeat",
280+
"background",
281+
"background-color",
282+
"background-image",
283+
"background-repeat",
284+
"background-attachment",
285+
"background-position",
286+
"background-position-x",
287+
"background-position-y",
288+
"background-origin",
289+
"background-size",
290+
"background-clip",
291+
"box-shadow",
292+
"box-decoration-break",
293+
"outline",
294+
"outline-width",
295+
"outline-style",
296+
"outline-color",
297+
"filter",
298+
299+
# Text styles
300+
"color",
301+
"font",
302+
"font-family",
303+
"font-style",
304+
"font-weight",
305+
"font-variant",
306+
"font-size",
307+
"font-size-adjust",
308+
"line-height",
309+
"letter-spacing",
310+
"word-spacing",
311+
"direction",
312+
"word-wrap",
313+
"overflow-wrap",
314+
"word-break",
315+
"hyphens",
316+
"white-space",
317+
"text-align",
318+
"text-align-last",
319+
"text-indent",
320+
"text-overflow",
321+
"text-transform",
322+
"text-decoration",
323+
"text-shadow",
324+
"text-rendering",
325+
"text-size-adjust",
326+
"vertical-align",
327+
"tab-size",
328+
"list-style",
329+
"list-style-position",
330+
"list-style-type",
331+
"list-style-image",
332+
333+
# Transforms
334+
"transform",
335+
"transform-function",
336+
"transform-origin",
337+
"transform-style",
338+
"perspective",
339+
"perspective-origin",
340+
"backface-visibility",
341+
342+
# Transitions and Animations
343+
"transition",
344+
"transition-property",
345+
"transition-duration",
346+
"transition-timing-function",
347+
"transition-delay",
348+
"animation",
349+
"animation-name",
350+
"animation-duration",
351+
"animation-timing-function",
352+
"animation-delay",
353+
"animation-iteration-count",
354+
"animation-direction",
355+
"animation-fill-mode",
356+
"animation-play-state",
357+
358+
# Browser UI
359+
"cursor",
360+
"user-select",
361+
"resize",
362+
"pointer-events",
363+
364+
# Non-standard properties
365+
"-webkit-appearance",
366+
"-moz-appearance",
367+
"-webkit-overflow-scrolling",
368+
"-webkit-tap-highlight-color",
369+
"-webkit-text-stroke"
370+
]

0 commit comments

Comments
 (0)