chore: add pre-commit git hooks to repo #474

This commit is contained in:
Shyam Mahajan
2023-10-12 04:14:13 +00:00
committed by AJ ONeal
parent 41f1c69a30
commit db5113e025
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
set -e
set -u
npm run fmt
npm run lint
npm run test
+1
View File
@@ -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 jshint@2.x -- jshint -c ./.jshintrc --exclude 'node_modules/**/*' */*.js */*/*.js",