Skip to content

Commit

Permalink
- Add husky for pre-commit actions
Browse files Browse the repository at this point in the history
  • Loading branch information
DorShakedMonday committed May 2, 2024
1 parent 759923f commit ce37ba0
Show file tree
Hide file tree
Showing 3 changed files with 523 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint:fix
yarn prettier:fix

yarn prepublish-and-build
yarn circular-dependency-check
git add -u
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"build:esm": "tsc -p ./tsconfig.esm.json && tsc-alias -f -p tsconfig.esm.json",
"build:cjs": "tsc -p ./tsconfig.cjs.json && tsc-alias -f -p ./tsconfig.cjs.json",
"build": "rm -rf dist/ && yarn prettier:fix && yarn lint-fix && ./scripts/create-minified-package-json.sh && yarn build:esm && yarn build:cjs && ./scripts/build-package-json",
"prepublish-and-build": "yarn install --frozen-lockfile && yarn build"
"prepublish-and-build": "yarn install --frozen-lockfile && yarn build",
"circular-dependency-check": "madge -c .",
"prepare": "husky install"
},
"files": [
"dist",
Expand Down Expand Up @@ -57,6 +59,7 @@
"eslint-plugin-n": "^15.6.1",
"husky": "^8.0.3",
"jest": "^27.3.1",
"madge": "^7.0.0",
"prettier": "^2.8.4",
"ts-jest": "^27.0.5",
"tsc-alias": "^1.8.4",
Expand Down
Loading

0 comments on commit ce37ba0

Please sign in to comment.