Skip to content

Commit

Permalink
chore: add pre-commit git hooks to repo #474
Browse files Browse the repository at this point in the history
  • Loading branch information
ShyamMahajan authored and coolaj86 committed Oct 12, 2023
1 parent 41f1c69 commit db5113e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions _scripts/git-hooks-pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e
set -u

npm run fmt
npm run lint
npm run test
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"fmt": "npm run prettier && npm run shfmt",
"lint": "npm run shellcheck && npm run jshint",
"prepare": "node _scripts/git-hooks-init.js",
"test": "node _webi/test.js ./node/",
"----": "------------------------------------",
"jshint": "npx -p [email protected] -- jshint -c ./.jshintrc --exclude 'node_modules/**/*' */*.js */*/*.js",
Expand Down

0 comments on commit db5113e

Please sign in to comment.