diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..0da96d6b --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx pretty-quick --staged diff --git a/package-lock.json b/package-lock.json index b6d74772..74115e92 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index 78838986..2dfdfcb4 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.0.0", "description": "A Fosscord server written in Node.js", "scripts": { + "prepare": "husky install", "postinstall": "npx patch-package", "start": "node dist/bundle/start.js", "start:api": "node dist/api/start.js", @@ -51,7 +52,9 @@ "@types/sharp": "^0.31.0", "@types/ws": "^8.5.3", "express": "^4.18.1", + "husky": "^8.0.0", "prettier": "^2.7.1", + "pretty-quick": "^3.1.3", "typescript": "^4.8.3" }, "dependencies": {