File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1- npx commitlint --edit "$1"
1+ # commit-msg
2+
3+ # https://commitlint.js.org/guides/local-setup.html
4+ npx --no -- commitlint --edit $1
5+
Original file line number Diff line number Diff line change 1+ # pre-commit
2+
13echo "node version = $(node -v)"
24echo "npm version = $(npm -v)"
5+
6+ # https://github.com/lint-staged/lint-staged?tab=readme-ov-file#command-line-flags
37npx lint-staged --allow-empty
4- npx tsc --noEmit
8+
9+ # https://typicode.github.io/husky/get-started.html#scripting
10+ git update-index --again
11+
12+ # run pre-commit script
13+ npm run lint
Original file line number Diff line number Diff line change 4242 "build" : " NODE_ENV=production vite build" ,
4343 "lint:js" : " eslint" ,
4444 "lint:js:fix" : " eslint --fix" ,
45- "lint:type" : " tsc --project tsconfig.json " ,
45+ "lint:type" : " tsc --noEmit " ,
4646 "lint" : " npm run lint:js && npm run lint:type" ,
4747 "lint:fix" : " npm run lint:js:fix && npm run lint:type" ,
4848 "test" : " vitest run" ,
You can’t perform that action at this time.
0 commit comments