Skip to content

Commit 0ab4ccd

Browse files
committed
chore(package): add lint-staged
to speed up the development process, instead of running validation for every file, now it runs only for JS files
1 parent de45a42 commit 0ab4ccd

File tree

4 files changed

+354
-13
lines changed

4 files changed

+354
-13
lines changed

.huskyrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"hooks": {
3-
"pre-commit": "yarn validate",
3+
"pre-commit": "lint-staged",
44
"commit-msg": "npx commitlint -E HUSKY_GIT_PARAMS"
55
}
66
}

.lintstagedrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
linters:
2+
"*.js":
3+
- yarn validate
4+
- yarn build
5+
- git add
6+
ignore:
7+
- src/**/*.joi.js

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"cz-conventional-changelog": "2.1.0",
9999
"faker": "^4.1.0",
100100
"husky": "^1.3.1",
101+
"lint-staged": "^8.1.5",
101102
"mocha": "^5.0.5",
102103
"mocha-lcov-reporter": "^1.3.0",
103104
"npm-watch": "^0.3.0",

0 commit comments

Comments
 (0)