Skip to content

Commit

Permalink
feat: setup husky
Browse files Browse the repository at this point in the history
  • Loading branch information
RanGojo committed Oct 30, 2023
1 parent 48c7ecb commit 129b14e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

if [ -z "${GIT_COMMITTER_DATE:-}" ]; then
DATE="$(date -u +%Y-%m-%dT%H:%M:%S%z)";
export GIT_AUTHOR_DATE="$DATE";
export GIT_COMMITTER_DATE="$DATE"
git commit --amend --date "$DATE" --no-edit
fi
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"prepare": "husky install"
},
"dependencies": {
"@react-spring/web": "^9.5.5",
Expand Down Expand Up @@ -36,6 +37,7 @@
"eslint-plugin-n": "^15.5.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.31.11",
"husky": "^8.0.0",
"postcss": "^8.4.19",
"tailwindcss": "^3.2.4",
"typescript": "^4.9.3"
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1889,6 +1889,11 @@ hasown@^2.0.0:
dependencies:
function-bind "^1.1.2"

husky@^8.0.0:
version "8.0.3"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184"
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==

ignore@^5.1.1, ignore@^5.2.0:
version "5.2.4"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
Expand Down

0 comments on commit 129b14e

Please sign in to comment.