From 717e2a8d3a740dd7799669b7f2a1390a2f239a6e Mon Sep 17 00:00:00 2001 From: Son Tran Thanh <286.trants@gmail.com> Date: Sat, 20 Jul 2024 03:24:15 +0700 Subject: [PATCH] chore(husky): fix pre-commit lastest version * Husky pre-commit fails with code 1 - (#1014): https://github.com/typicode/husky/issues/1014 --- .husky/pre-commit | 3 --- package.json | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index f2b1ea5..ca0c8bf 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - npx lint-staged && npm run prettier diff --git a/package.json b/package.json index 3ebb44b..aa939ec 100644 --- a/package.json +++ b/package.json @@ -68,10 +68,12 @@ "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.34.0", "eslint-plugin-react-hooks": "^4.6.0", + "lint-staged": "^15.2.7", "prettier": "^3.2.5", "prettier-eslint-cli": "^8.0.1", "typescript": "5.1.6", - "vite-tsconfig-paths": "^4.3.1" + "vite-tsconfig-paths": "^4.3.1", + "husky": "^8.0.0" }, "scripts": { "start": "npx husky install & vite",