Skip to content

Commit 066a3c8

Browse files
committed
Add a first version of sass-lint
1 parent 825fca1 commit 066a3c8

File tree

7 files changed

+146
-11
lines changed

7 files changed

+146
-11
lines changed

.sass-lint.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
options:
2+
formatter: stylish
3+
files:
4+
include: '_sass/**/*.s+(a|c)ss'
5+
ignore:
6+
- '/node_modules/**/*.s+(a|c)ss'
7+
- 'dist/*.css'
8+
rules:
9+
10+
# Extends
11+
extends-before-declarations: 0
12+
extends-before-mixins: 0
13+
placeholder-in-extend: 0
14+
15+
# Styleguide
16+
attribute-quotes: 2
17+
bem-depth: 0
18+
border-zero: 0
19+
brace-style: 2
20+
clean-import-paths: 2
21+
empty-args: 0
22+
hex-length: 2
23+
hex-notation: 2
24+
indentation:
25+
- 2
26+
-
27+
size: 2
28+
leading-zero: 0
29+
nesting-depth: 2
30+
property-sort-order: 0
31+
pseudo-element: 0
32+
quotes:
33+
- 2
34+
-
35+
style: 'single'
36+
shorthand-values: 0
37+
url-quotes: 2
38+
variable-for-property: 0
39+
zero-unit: 2
40+
41+
# Final items
42+
final-newline: 0
43+
44+
# Nesting
45+
force-attribute-nesting: 0
46+
force-element-nesting: 0
47+
force-pseudo-nesting: 0
48+
49+
# Disallow
50+
no-attribute-selectors: 0
51+
no-color-hex: 0
52+
no-color-keywords: 2
53+
no-color-literals: 0
54+
no-combinators: 0
55+
no-css-comments: 2
56+
no-debug: 0
57+
no-disallowed-properties: 0
58+
no-duplicate-properties:
59+
- 2
60+
-
61+
exclude:
62+
- display
63+
- opacity
64+
no-empty-rulesets: 2
65+
no-extends: 0
66+
no-ids: 0
67+
no-important: 0
68+
no-invalid-hex: 2
69+
no-mergeable-selectors: 0
70+
no-qualifying-elements:
71+
- 2
72+
-
73+
allow-element-with-attribute: true
74+
allow-element-with-class: true
75+
no-misspelled-properties: 2
76+
no-trailing-whitespace: 2
77+
no-trailing-zero: 0
78+
no-transition-all: 0
79+
no-universal-selectors: 0
80+
no-url-domain: 0
81+
no-url-protocols: 0
82+
no-vendor-prefixes: 0
83+
no-warn: 0
84+
property-units: 0
85+
86+
# Mixins
87+
mixins-before-declarations: 0
88+
89+
# Inner spacing
90+
space-after-bang: 0
91+
space-before-bang: 0
92+
93+
space-before-brace: 2
94+
95+
space-after-colon: 2
96+
space-before-colon: 0
97+
98+
space-after-comma: 2
99+
100+
space-between-parens: 0
101+
102+
space-around-operator: 2
103+
104+
# Line spacing
105+
empty-line-between-blocks: 2
106+
one-declaration-per-line: 2
107+
single-line-per-selector: 2
108+
109+
# Final items
110+
trailing-semicolon: 2
111+
112+
# Name formats
113+
class-name-format:
114+
- 2
115+
-
116+
convention: 'hyphenatedbem'
117+
ignore:
118+
- 'processStep'
119+
function-name-format: 0
120+
id-name-format: 0
121+
mixin-name-format: 2
122+
placeholder-name-format: 0
123+
variable-name-format:
124+
- 2
125+
-
126+
convention: 'hyphenatedbem'

src/_config.sass

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ $loader-bar--text-color: #fff
2828
$loader-border--width: 15px
2929
$loader-border--height: 15px
3030
$loader-border--text-color: #fff
31-
$loader-border--color: yellow
31+
$loader-border--color: #fff000
3232

3333
// Loader ball
3434
// ==========================================================================
3535
$loader-ball--color: #fff
36-
$loader-ball--shadow: rgba(0,0,0,.5)
36+
$loader-ball--shadow: rgba(0, 0, 0, .5)
3737

3838
// Loader smartphone
3939
// ==========================================================================
40-
$loader-smartphone--color: gold
40+
$loader-smartphone--color: #ffd700
4141
$loader-smartphone--text-color: #fff
4242

4343
// Loader clock

src/loaders/_loader-ball.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
animation: shadow 1s infinite alternate ease-out both
3333

3434
@keyframes shadow
35-
0%,
35+
0%,
3636
40%
3737
background-color: rgba(0,0,0,0)
3838
transform: scale(0)

src/loaders/_loader-bar.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// ==========================================================================
33
44
.loader-bar
5-
5+
66
// Before is used for data-text attribute
77
&[data-text]:before
88
top: calc(50% - 40px)

src/loaders/_loader-border.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535

3636
.loader-border
37-
37+
3838
// Before is used for data-text attribute
3939
&[data-text]:before
4040
color: $loader-border--text-color

src/loaders/_loader-smartphone.sass

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
border: solid 5px $loader-smartphone--color
2020
border-radius: 10px
2121
box-shadow: 0 5px 0 0 $loader-smartphone--color inset
22-
background: radial-gradient(circle at 50% 90%, rgba(0,0,0,.5) 6px, transparent 6px), linear-gradient(to top, $loader-smartphone--color 22px, transparent 22px), linear-gradient(to top, rgba(0,0,0,.5) 22px, rgba(0,0,0,.5) 100%)
23-
animation: shake 2s cubic-bezier(.36,.07,.19,.97) both infinite
22+
background: radial-gradient(circle at 50% 90%, rgba(0, 0, 0, .5) 6px, transparent 6px), linear-gradient(to top, $loader-smartphone--color 22px, transparent 22px), linear-gradient(to top, rgba(0, 0, 0,.5) 22px, rgba(0, 0, 0, .5) 100%)
23+
animation: shake 2s cubic-bezier(.36, .07, .19, .97) both infinite
2424

2525
&[data-screen = '']
2626
&:after
@@ -32,8 +32,17 @@
3232
content: attr(data-screen)
3333

3434
@keyframes shake
35-
5%, 15%, 25%, 35%, 45%, 55%
35+
5%,
36+
15%,
37+
25%,
38+
35%,
39+
45%,
40+
55%
3641
transform: translate3d(-1px, 0, 0);
3742

38-
10%, 20%, 30%, 40%, 50%
43+
10%,
44+
20%,
45+
30%,
46+
40%,
47+
50%
3948
transform: translate3d(1px, 0, 0);

src/loaders/_loader.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
top: calc(50% - #{$loader--size / 2})
1919
left: calc(50% - #{$loader--size / 2})
2020
animation: rotation 1s linear infinite
21-
21+
2222
// Half
2323
&[half]
2424
&:after

0 commit comments

Comments
 (0)