Skip to content

Commit

Permalink
husky によるコード整形が動作していなかったため修正
Browse files Browse the repository at this point in the history
- 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` に変更
  • Loading branch information
nanasess committed Feb 7, 2025
1 parent 318459f commit e0170be
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged -q || node -e ''
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit e0170be

Please sign in to comment.