From e0170beb227f3f04a60f39fc446ef88611729666 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Fri, 7 Feb 2025 01:56:44 +0900 Subject: [PATCH] =?UTF-8?q?husky=20=E3=81=AB=E3=82=88=E3=82=8B=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E6=95=B4=E5=BD=A2=E3=81=8C=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump husky from 8.0.3 to 9.1.7 - package.json の husky に設定していた pre-commit を .husky/pre-commit に移動 - php-cs-fixer の設定ファイル名が間違っていたのを修正 - `lint-staged 2>&1 | echo` が動作しないため `lint-staged -q` に変更 --- .husky/pre-commit | 1 + package-lock.json | 13 +++++++------ package.json | 12 ++++-------- 3 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000000..9eeb960e49 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged -q || node -e '' diff --git a/package-lock.json b/package-lock.json index f12430ac3a..8de1f0dc20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "gulp-postcss": "^8.0.0", "gulp-rename": "^1.4.0", "gulp-sass": "^5.1.0", - "husky": "^8.0.3", + "husky": "^9.1.7", "lint-staged": "^13.2.1", "normalize.css": "^5.0.0", "postcss-import": "^12.0.1", @@ -5306,15 +5306,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.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", "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 f2b49f242c..64cf8905b5 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "test": "echo \"Error: no test specified\" && exit 1", "clean": "echo \"Error: no clean specified\" && exit 1", "build": "gulp", - "start": "gulp start" + "start": "gulp start", + "prepare": "husky" }, "repository": { "type": "git", @@ -24,14 +25,9 @@ "homepage": "https://www.ec-cube.net/", "lint-staged": { "*.php": [ - "cross-env vendor/bin/php-cs-fixer --config=.php_cs.dist --path-mode=intersection fix" + "cross-env vendor/bin/php-cs-fixer --config=.php-cs-fixer.dist.php --path-mode=intersection fix" ] }, - "husky": { - "hooks": { - "pre-commit": "lint-staged 2>&1 | echo || node -e ''" - } - }, "dependencies": { "@babel/polyfill": "^7.12.1", "@popperjs/core": "^2.11.8", @@ -68,7 +64,7 @@ "gulp-postcss": "^8.0.0", "gulp-rename": "^1.4.0", "gulp-sass": "^5.1.0", - "husky": "^8.0.3", + "husky": "^9.1.7", "lint-staged": "^13.2.1", "normalize.css": "^5.0.0", "postcss-import": "^12.0.1",