From 11bc53cdc483c86e5fb2487e525c55675c834321 Mon Sep 17 00:00:00 2001 From: Sachin Kumar Date: Mon, 29 Jul 2024 08:29:20 +0530 Subject: [PATCH] chore: update husky hooks (#242) --- .husky/commit-msg | 1 + .husky/pre-commit | 5 +---- package-lock.json | 13 +++++++------ package.json | 4 ++-- 4 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 .husky/commit-msg diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 0000000..dbce4f4 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1 @@ +commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit index d37daa0..c27d889 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx --no-install lint-staged +lint-staged diff --git a/package-lock.json b/package-lock.json index c6c2613..2fb0c16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "eslint": "^8.50.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.28.1", - "husky": "^8.0.3", + "husky": "^9.1.3", "jest": "^29.7.0", "lint-staged": "^15.2.7", "memfs": "^4.9.3", @@ -9846,15 +9846,16 @@ } }, "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.3.tgz", + "integrity": "sha512-ET3TQmQgdIu0pt+jKkpo5oGyg/4MQZpG6xcam5J5JyNJV+CBT23OBpCF15bKHKycRyMH9k6ONy8g2HdGIsSkMQ==", "dev": true, + "license": "MIT", "bin": { - "husky": "lib/bin.js" + "husky": "bin.js" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" diff --git a/package.json b/package.json index 688bb2c..7055092 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage", "pretest": "npm run lint", "test": "npm run test:coverage", - "prepare": "husky install && npm run build", + "prepare": "husky && npm run build", "release": "standard-version" }, "files": [ @@ -62,7 +62,7 @@ "eslint": "^8.50.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.28.1", - "husky": "^8.0.3", + "husky": "^9.1.3", "jest": "^29.7.0", "lint-staged": "^15.2.7", "memfs": "^4.9.3",