diff --git a/js/.husky/.gitignore b/js/.husky/.gitignore deleted file mode 100644 index 31354ec138..0000000000 --- a/js/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/js/.husky/pre-commit b/js/.husky/pre-commit index 68ab20e02e..ce092249c8 100755 --- a/js/.husky/pre-commit +++ b/js/.husky/pre-commit @@ -1,14 +1,2 @@ -#!/bin/sh - -# Get the path the the Husky script. -FILE="$(dirname "$0")/_/husky.sh" - -# Exit if Husky is not installed. -if [ ! -f "$FILE" ]; then - exit 0; -fi - -# Run the Husky script, and pre-commit hooks. -. $FILE cd js -npx lint-staged +pnpm exec lint-staged diff --git a/js/package.json b/js/package.json index 5564a19d3a..b7412ad85b 100644 --- a/js/package.json +++ b/js/package.json @@ -2,7 +2,7 @@ "name": "root", "type": "module", "scripts": { - "prepare": "cd .. && husky install js/.husky" + "prepare": "cd .. && husky js/.husky" }, "devDependencies": { "@types/node": "^20.11.15", @@ -18,7 +18,7 @@ "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", - "husky": "^8.0.3", + "husky": "^9.0.9", "lint-staged": "^15.2.1", "prettier": "^3.2.4", "tslib": "^2.6.2", diff --git a/js/pnpm-lock.yaml b/js/pnpm-lock.yaml index e0707941f8..605668594e 100644 --- a/js/pnpm-lock.yaml +++ b/js/pnpm-lock.yaml @@ -48,8 +48,8 @@ importers: specifier: ^4.6.0 version: 4.6.0(eslint@8.56.0) husky: - specifier: ^8.0.3 - version: 8.0.3 + specifier: ^9.0.9 + version: 9.0.9 lint-staged: specifier: ^15.2.1 version: 15.2.1 @@ -4586,9 +4586,9 @@ packages: engines: {node: '>=16.17.0'} dev: true - /husky@8.0.3: - resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==} - engines: {node: '>=14'} + /husky@9.0.9: + resolution: {integrity: sha512-eW92PRr1XPKDWd7/iM2JvAl9gEKK3TF69yvbllQtKSYBw+Wtoi+P38NqH1Z7++sSd80FBkFagBFJkoQvMhCnGw==} + engines: {node: '>=18'} hasBin: true dev: true