Skip to content

Commit c0b830f

Browse files
Himenonclaude
andcommitted
chore: simple-git-hooks と lint-staged を lefthook に移行
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
1 parent 8dd17e4 commit c0b830f

3 files changed

Lines changed: 113 additions & 246 deletions

File tree

lefthook.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pre-commit:
2+
commands:
3+
format:
4+
glob: "*.{js,jsx,json,yml,yaml,html,md,ts,tsx}"
5+
run: biome format --no-errors-on-unmatched --write {staged_files}
6+
stage_fixed: true
7+
sort-package-json:
8+
glob: "package.json"
9+
run: pnpm exec sort-package-json {staged_files}
10+
stage_fixed: true

package.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,6 @@
7777
"validate": "pnpm ts ./scripts/validate.ts",
7878
"watch": "pnpm ts ./scripts/watch.ts"
7979
},
80-
"simple-git-hooks": {
81-
"pre-commit": "pnpm lint-staged"
82-
},
83-
"lint-staged": {
84-
"*.{js,jsx,json,yml,yaml,html,md,ts,tsx}": [
85-
"biome format --no-errors-on-unmatched --write"
86-
],
87-
"package.json": [
88-
"sort-package-json"
89-
]
90-
},
9180
"resolutions": {
9281
"kind-of": "6.0.3",
9382
"node-fetch": "2.6.1"
@@ -121,13 +110,12 @@
121110
"import-sort-style-module": "6.0.0",
122111
"jest": "30.3.0",
123112
"jest-cli": "30.3.0",
113+
"lefthook": "^2.1.6",
124114
"lerna": "9.0.7",
125-
"lint-staged": "16.4.0",
126115
"npm-run-all": "4.1.5",
127116
"openapi-schema-validator": "12.1.3",
128117
"read-package-up": "^12.0.0",
129118
"rimraf": "6.1.3",
130-
"simple-git-hooks": "^2.13.1",
131119
"sort-package-json": "3.6.1",
132120
"ts-jest": "29.4.9",
133121
"ts-node": "10.9.2",

0 commit comments

Comments
 (0)