Skip to content

Commit acd8416

Browse files
committed
precommit allows warnings, npm run lint & PR do not allow warnings
1 parent 84e293f commit acd8416

File tree

3 files changed

+52
-11
lines changed

3 files changed

+52
-11
lines changed

Diff for: .sass-lint-precommit.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# sass-lint config generated by make-sass-lint-config v0.1.2
2+
#
3+
# The following scss-lint Linters are not yet supported by sass-lint:
4+
# PrivateNamingConvention
5+
6+
files:
7+
include: '**/*.s+(a|c)ss'
8+
options:
9+
formatter: stylish
10+
merge-default-rules: false
11+
rules:
12+
bem-depth: 1
13+
border-zero:
14+
- 1
15+
- convention: zero
16+
brace-style:
17+
- 1
18+
- allow-single-line: false
19+
class-name-format:
20+
- 1
21+
- convention: ^(?!js-).*
22+
convention-explanation: should not be written in the form js-*
23+
extends-before-declarations: 0
24+
extends-before-mixins: 0
25+
function-name-format: 1
26+
id-name-format:
27+
- 1
28+
- convention: hyphenatedbem
29+
leading-zero: 0
30+
mixin-name-format: 1
31+
mixins-before-declarations: 0
32+
no-extends: 1
33+
no-qualifying-elements: 0
34+
placeholder-name-format:
35+
- 1
36+
- convention: hyphenatedbem
37+
property-sort-order: 0
38+
quotes:
39+
- 1
40+
- style: double
41+
variable-name-format: 1

Diff for: .sass-lint.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,33 @@ options:
99
formatter: stylish
1010
merge-default-rules: false
1111
rules:
12-
bem-depth: 1
12+
bem-depth: 2
1313
border-zero:
14-
- 1
14+
- 2
1515
- convention: zero
1616
brace-style:
17-
- 1
17+
- 2
1818
- allow-single-line: false
1919
class-name-format:
20-
- 1
20+
- 2
2121
- convention: ^(?!js-).*
2222
convention-explanation: should not be written in the form js-*
2323
extends-before-declarations: 0
2424
extends-before-mixins: 0
2525
function-name-format: 1
2626
id-name-format:
27-
- 1
27+
- 2
2828
- convention: hyphenatedbem
2929
leading-zero: 0
30-
mixin-name-format: 1
30+
mixin-name-format: 2
3131
mixins-before-declarations: 0
32-
no-extends: 1
32+
no-extends: 2
3333
no-qualifying-elements: 0
3434
placeholder-name-format:
35-
- 1
35+
- 2
3636
- convention: hyphenatedbem
3737
property-sort-order: 0
3838
quotes:
39-
- 1
39+
- 2
4040
- style: double
41-
variable-name-format: 1
41+
variable-name-format: 2

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"lint-staged": "lint-staged",
8282
"lint-fix": "./node_modules/.bin/eslint --fix static/js/redux/* static/js/redux/alerts/* static/js/redux/actions/* static/js/redux/constants/* static/js/redux/reducers/* static/js/redux/ui/containers/* static/js/redux/ui/alerts/*",
8383
"lint": "./node_modules/.bin/eslint static/js/redux/*/*; ./node_modules/.bin/sass-lint -c .sass-lint.yml 'static/css/timetable/*.scss, static/css/timetable/**/*.scss' -v -q",
84-
"lint-scss-staged": "./node_modules/.bin/sass-lint -c .sass-lint.yml -v -q"
84+
"lint-scss-staged": "./node_modules/.bin/sass-lint -c .sass-lint-precommit.yml -v -q"
8585
},
8686
"repository": {
8787
"type": "git",

0 commit comments

Comments
 (0)