diff --git a/.husky/pre-commit b/.husky/pre-commit index 9181511e..5b216b75 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - NODE_ENV=dev && node_modules/.bin/lint-staged && node_modules/.bin/tsc diff --git a/package-lock.json b/package-lock.json index 698b89c3..e196d945 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,7 +77,7 @@ "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-import": "^2.29.1", "eslint-plugin-prettier": "^4.2.1", - "husky": "^8.0.3", + "husky": "^9.1.6", "jest": "^29.7.0", "jest-html-reporter": "^3.10.2", "jest-junit": "^15.0.0", @@ -6464,15 +6464,15 @@ } }, "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.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", + "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", "dev": true, "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 ad576a69..5363c5bd 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": "git@github.com:ministryofjustice/use-of-force.git", "license": "MIT", "scripts": { - "postinstall": "husky install", + "prepare": "husky", "copy-views": "cp -R server/views dist/server/", "watch-views": "nodemon --watch server/views -e html,njk -x npm run copy-views", "watch-ts": "tsc -w", @@ -164,7 +164,7 @@ "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-import": "^2.29.1", "eslint-plugin-prettier": "^4.2.1", - "husky": "^8.0.3", + "husky": "^9.1.6", "jest": "^29.7.0", "jest-html-reporter": "^3.10.2", "jest-junit": "^15.0.0",