Skip to content

Commit

Permalink
fix: speed up precommit hooks (#1820)
Browse files Browse the repository at this point in the history
  • Loading branch information
karrui authored May 7, 2021
1 parent 3a393a8 commit b9c43c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged && sh secrets-check.sh
npm run pre-commit && sh secrets-check.sh
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"lint": "npm run lint-code && npm run lint-style && npm run lint-html",
"lint-ci": "concurrently \"eslint src/ --quiet\" \"stylelint '*/**/*.css' --quiet\" \"htmlhint\" \"prettier --c './src/public/**/*.html' --ignore-path './dist/**'\"",
"version": "auto-changelog -p && git add CHANGELOG.md",
"prepare": "husky install"
"prepare": "husky install",
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,ts}": "eslint --fix",
Expand Down

0 comments on commit b9c43c0

Please sign in to comment.