Skip to content

Commit

Permalink
fix: add husky pre-commit (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyw authored Sep 17, 2024
1 parent c4eb27b commit 105ed8e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
id-token: write
contents: write

env:
HUSKY: 0

steps:
- uses: actions/checkout@v4
with:
Expand Down
9 changes: 9 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/env bash

set -e

npm run prettier:check

if command -v pre-commit &> /dev/null; then
pre-commit run
fi
32 changes: 32 additions & 0 deletions package-lock.json

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

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"build-storybook": "storybook build",
"prettier:check": "npx --yes prettier --check .",
"prettier:fix": "npx --yes prettier --write .",
"tsc:full": "tsc --skipLibCheck true --incremental false"
"tsc:full": "tsc --skipLibCheck true --incremental false",
"prepare": "husky"
},
"author": "",
"license": "ISC",
Expand Down Expand Up @@ -77,10 +78,12 @@
"@types/uuid": "^10.0.0",
"babel-jest": "^29.7.0",
"conventional-changelog-conventionalcommits": "^7.0.2",
"husky": "^9.1.6",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jsdom-global": "^3.0.2",
"pinst": "^3.0.0",
"react-datepicker": "^7.3.0",
"resize-observer-polyfill": "^1.5.1",
"rimraf": "^5.0.7",
Expand Down

0 comments on commit 105ed8e

Please sign in to comment.