Skip to content

Commit 2c913d3

Browse files
authored
build: properly set up husky with postinstall (#31)
1 parent 50f7b68 commit 2c913d3

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

.husky/commit-msg

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
4-
yarn commitlint --edit "$1"
1+
./node_modules/.bin/commitlint --edit "$1"

.husky/pre-commit

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
4-
yarn lint-staged
1+
./node_modules/.bin/lint-staged

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"fix": "yarn format:fix && yarn lint:fix",
2020
"format:check": "prettier --check '{{src,test,cypress}/**/*,*}.{js,jsx,ts,tsx,json,json5,yml,yaml,md}'",
2121
"format:fix": "prettier --write '{{src,test,cypress}/**/*,*}.{js,jsx,ts,tsx,json,json5,yml,yaml,md}'",
22+
"postinstall": "husky",
2223
"lint:check": "eslint '{{src,test,cypress}/**/*,*}.{js,jsx,ts,tsx}'",
2324
"lint:fix": "eslint '{{src,test,cypress}/**/*,*}.{js,jsx,ts,tsx}' --fix",
24-
"prepare": "husky",
2525
"sort:check": "sort-package-json --check",
2626
"sort:fix": "sort-package-json",
2727
"start:dev": "dotenv -v NODE_ENV=development -c development -- nodemon",

0 commit comments

Comments
 (0)