Skip to content

Commit fa6d81c

Browse files
authored
Switching over the yml file to be sass-lint (#2)
1 parent 48f3c8b commit fa6d81c

File tree

3 files changed

+68
-48
lines changed

3 files changed

+68
-48
lines changed

.sass-lint.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#########################
2+
## RTR Sass Lint File ##
3+
#########################
4+
# You can either run this on the whole codebase, or use
5+
# the git pre-push hook to only lint files that you have
6+
# made alterations to.
7+
# Please see this confluence document: https://renttherunway.jira.com/wiki/display/EN/Storefront+Conventions+and+Best+Practices
8+
# for more information on Storefront CSS best practices.
9+
10+
# Linter Options
11+
options:
12+
# Don't merge default rules
13+
merge-default-rules: false
14+
# Set the formatter to 'stylish'
15+
formatter: stylish
16+
# Raise an error if more than 50 warnings are generated
17+
max-warnings: 50
18+
# File Options
19+
files:
20+
include: 'assets/stylesheets/sass/**/*.scss'
21+
ignore:
22+
- 'node_modules/**/*.*'
23+
# Rule Configuration
24+
rules:
25+
declarations-before-nesting: 2
26+
empty-line-between-blocks: 1
27+
extends-before-mixins: 2
28+
extends-before-declarations: 2
29+
hex-notation:
30+
- 2
31+
-
32+
style: uppercase
33+
mixins-before-declarations:
34+
- 2
35+
-
36+
exclude:
37+
# These are all our media query mixins
38+
- short-mobile-breakpoint
39+
- mobile-breakpoint
40+
- tablet-breakpoint
41+
- laptop-breakpoint
42+
- nav-desktop-breakpoint
43+
- desktop-breakpoint
44+
- widescreen-breakpoint
45+
- mobile-and-tablet-breakpoint
46+
- tablet-and-desktop-breakpoint
47+
- short-tablet-and-desktop-breakpoint
48+
- desktop-not-widescreen
49+
- short-device-breakpoint
50+
- smaller-than-laptop-breakpoint
51+
- on-load
52+
nesting-depth:
53+
- 1
54+
-
55+
max-depth: 5
56+
no-css-comments: 2
57+
no-debug: 1
58+
no-duplicate-properties: 1
59+
no-empty-rulesets: 2
60+
no-ids: 2
61+
no-important: 1
62+
no-invalid-hex: 2
63+
no-mergeable-selectors: 1
64+
no-warn: 1
65+
single-line-per-selector: 2
66+
space-after-colon: 2

.scss-lint.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
*A mostly reasonable approach to CSS and Sass*
44

5-
Adapted from Airbnb
5+
Adapted from Airbnb
66

77
## Table of Contents
88

@@ -112,10 +112,10 @@ Finally, properties are what give the selected elements of a rule declaration th
112112
### Comments
113113

114114
* Prefer line comments (`//` in Sass-land) to block comments.
115-
* Prefer comments on their own line. Avoid end-of-line comments.
116115
* Write detailed comments for code that isn't self-documenting:
117116
- Uses of z-index
118117
- Compatibility or browser-specific hacks
118+
- Why the linter needs to be disabled
119119

120120
### OOCSS and BEM
121121

0 commit comments

Comments
 (0)