Skip to content

Commit dce25f7

Browse files
author
Kyle Holmberg
committed
Extract git hook deps to separate config files
1 parent 925c44a commit dce25f7

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

.huskyrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "yarn lint-staged",
4+
"pre-push": "yarn test:changes"
5+
}
6+
}

.lintstagedrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"*.js": [
3+
"prettier --write",
4+
"eslint --fix",
5+
],
6+
"*.css": [
7+
"prettier --write",
8+
"stylelint --fix",
9+
]
10+
}

package.json

-18
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,6 @@
2929
"test:watch": "yarn test --watch",
3030
"test:update-snaps": "yarn test -u"
3131
},
32-
"husky": {
33-
"hooks": {
34-
"pre-commit": "yarn lint-staged",
35-
"pre-push": "yarn test:changes"
36-
}
37-
},
38-
"lint-staged": {
39-
"*.js": [
40-
"prettier --write",
41-
"eslint --fix",
42-
"git add"
43-
],
44-
"*.css": [
45-
"prettier --write",
46-
"stylelint --fix",
47-
"git add"
48-
]
49-
},
5032
"nyc": {
5133
"extends": "./nyc.config.js",
5234
"report-dir": "cypress-coverage",

0 commit comments

Comments
 (0)