Skip to content

Commit

Permalink
Merge pull request #663 from cflee/husky-v9
Browse files Browse the repository at this point in the history
chore: upgrade husky setup for v9
  • Loading branch information
LoneRifle authored May 20, 2024
2 parents 702ae94 + a8e91a6 commit 6849917
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0)
}
const husky = (await import('husky')).default
console.log(husky())
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
3 changes: 0 additions & 3 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --from origin/main --to HEAD --verbose
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"cz": "git-cz",
"lint": "eslint lib",
"lint-fix": "eslint --fix lib",
"postinstall": "husky install",
"prepare": "node .husky/install.mjs",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
},
Expand Down

0 comments on commit 6849917

Please sign in to comment.