diff --git a/.husky/pre-push b/.git-hooks/pre-push old mode 100644 new mode 100755 similarity index 50% rename from .husky/pre-push rename to .git-hooks/pre-push index 702cd32..3aad7c9 --- a/.husky/pre-push +++ b/.git-hooks/pre-push @@ -1 +1,5 @@ +#!/bin/bash + +set -e -o pipefail + cd v2 && npm run lint && npm test diff --git a/v2/package-lock.json b/v2/package-lock.json index ad0baeb..1a2e1bb 100644 --- a/v2/package-lock.json +++ b/v2/package-lock.json @@ -37,8 +37,8 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-security": "^3.0.0", - "husky": "^9.0.11", "prettier": "^3.3.1", + "set-git-hooks-dir": "^0.0.0", "stylelint": "^16.6.1", "stylelint-config-standard": "^36.0.0", "typescript": "^5.5.2" @@ -4349,22 +4349,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/husky": { - "version": "9.0.11", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", - "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", - "dev": true, - "license": "MIT", - "bin": { - "husky": "bin.mjs" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -6437,6 +6421,17 @@ "node": ">= 0.4" } }, + "node_modules/set-git-hooks-dir": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/set-git-hooks-dir/-/set-git-hooks-dir-0.0.0.tgz", + "integrity": "sha512-pM2FbOlyqEH5NuSmLVAnhKmjYJumAj0stPahv/elX5EXjA4PYUW2MFARcomF3EQ7Fh5EcEC9tdXFD6Cc+nWnLA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/v2/package.json b/v2/package.json index ddb942b..e77ae96 100644 --- a/v2/package.json +++ b/v2/package.json @@ -23,8 +23,7 @@ "lint:eslint": "eslint --max-warnings 0 \"web/**/*.ts\" \"web/**/*.tsx\"", "lint:stylelint": "stylelint web/style.css", "lint:web": "concurrently -c auto npm:lint:tsc npm:lint:prettier npm:lint:eslint npm:lint:stylelint", - "test": "cargo test", - "prepare": "cd .. && husky" + "test": "cargo test" }, "author": "rhysd (https://rhysd.github.io/)", "license": "MIT", @@ -57,7 +56,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-security": "^3.0.0", - "husky": "^9.0.11", + "set-git-hooks-dir": "^0.0.0", "prettier": "^3.3.1", "stylelint": "^16.6.1", "stylelint-config-standard": "^36.0.0",