Skip to content

Commit

Permalink
fix: enable and optimize husky hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumace committed Feb 6, 2024
1 parent fd467d7 commit 784b569
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
npx --no -- commitlint --edit $1
6 changes: 0 additions & 6 deletions .husky/pre-commit

This file was deleted.

3 changes: 2 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
npm run prettier:check
npm run lint:check
npm run test:coverage
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@
"build": "rm -fr dist && microbundle --target node -f umd",
"dev": "microbundle watch --target node",
"prettier": "prettier --config .prettierrc.js 'src/**/*.ts' --write",
"prettier:check": "prettier --config .prettierrc.js '**/**/*.ts'",
"lint": "eslint --fix --max-warnings 0 **/*.ts",
"lint:check": "eslint --max-warnings 0 **/*.ts",
"test": "jest",
"test:coverage": "jest --coverage",
"test:dev": "jest --watch",
"prepublishOnly": "npm run build",
"self:install": "node bin/index.js install",
"self:update": "node bin/index.js update",
"self:check": "node bin/index.js check"
"self:check": "node bin/index.js check",
"prepare": "husky install"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 784b569

Please sign in to comment.