Skip to content

Commit

Permalink
chore: add commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Apr 25, 2023
1 parent 8116ce3 commit 2592056
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ node_modules
!.flowconfig
!.github
!.gitignore
!.husky
!.npmignore
!.releaserc
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint:eslint && npm run lint:tsc && npm run test:ava && npm run build
18 changes: 9 additions & 9 deletions package-lock.json

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

12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"del-cli": "^4.0.1",
"eslint-config-canonical": "^41.0.3",
"eslint": "^8.39.0",
"husky": "^7.0.4",
"husky": "^8.0.0",
"inline-loops.macro": "^1.2.2",
"nyc": "^15.1.0",
"semantic-release": "^20.1.3",
Expand All @@ -37,11 +37,6 @@
"engines": {
"node": ">=16.0"
},
"husky": {
"hooks": {
"pre-commit": "npm run lint && npm run test && npm run build"
}
},
"keywords": [
"postgresql",
"interceptor",
Expand All @@ -58,7 +53,8 @@
"build": "del-cli ./dist && tsc",
"lint:eslint": "eslint ./src ./test",
"lint:tsc": "tsc --noEmit",
"test:ava": "nyc ava --verbose --serial"
"test:ava": "nyc ava --verbose --serial",
"prepare": "husky install"
},
"typings": "./dist/src/index.d.ts",
"version": "2.0.0",
Expand All @@ -68,4 +64,4 @@
"dependencies": {
"roarr": "^7.14.0"
}
}
}

0 comments on commit 2592056

Please sign in to comment.