Closed3

husky v4 -> v6 移行メモ

hirohiro

husky v4 -> v6 へのマイグレーション
https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v6
https://github.com/typicode/husky-4-to-6

npmだと

npm install husky@6 --save-dev \
  && npx husky-init \
  && npm exec -- github:typicode/husky-4-to-6 --remove-v4-config
npm install husky@6 --save-dev \
  && npx husky-init \
  && npm exec -- github:typicode/husky-4-to-6 --remove-v4-config

removed 16 packages, changed 2 packages, and audited 950 packages in 4s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Need to install the following packages:
  husky-init
Ok to proceed? (y) y
husky-init updating package.json
  setting prepare script to command "husky install"
husky - Git hooks installed
husky - created .husky/pre-commit

please review changes in package.json
Need to install the following packages:
  github:typicode/husky-4-to-6
Ok to proceed? (y) y
husky - created .husky/pre-commit
husky - deleted husky field from package.json

⚠️ pre-commit hook may need to be manually updated to be run via package manager.

Examples:
  jest → npx --no-install jest
       → yarn jest

  jest && eslint → npx --no-install jest && npx --no-install eslint
                 → yarn jest && yarn eslint

  commitlint -E HUSKY_GIT_PARAMS → npx --no-install commitlint --edit $1
                                 → yarn commitlint --edit $1

See https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v5
modified:   package-lock.json
modified:   package.json
.husky/.gitignore
.husky/pre-commit
このスクラップは2023/01/24にクローズされました