chore: lint-stagedとhuskyをlefthookに移行 - #492
Merged
Merged
Conversation
Replace husky and lint-staged with lefthook for pre-commit hooks. Consolidates hook configuration into lefthook.yml with parallel execution per package. Removes the complex NVM/FNM path setup shell script that was needed for husky. Closes SON-42 Co-authored-by: Jou Okuyama <Ojoxux@users.noreply.github.com>
Owner
Author
|
帰ったら見る |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request 概要
husky + lint-staged による pre-commit フックを lefthook に移行する。モノレポ向けの並列実行と設定の一元化を目的とする。
変更内容
husky,lint-stagedを削除し、lefthookを devDependency に追加lefthook.ymlを新規作成(パッケージ単位の lint:fix / format:fix / type-check を glob で定義)package.jsonのprepareスクリプトをlefthook installに変更.husky/pre-commit(NVM/FNM パス解決スクリプト)を削除lint-staged.config.mjsを削除.cursor/rulesの Git フック記述を lefthook に更新動作確認
npm install後にlefthook installが実行されることnpx lefthook validateが成功すること(All good)packages/utilsの TS ファイルをステージしてnpx lefthook run pre-commitを実行し、lint:fix / format:fix / type-check が並列実行されること関連Issue
レビューポイント
lefthook.ymlの glob パターンが既存lint-staged.config.mjsと同等のパッケージをカバーしているかparallel: trueによる並列実行で、パッケージ間の依存関係に問題がないかprepareスクリプト変更後、新規 clone 時のフックインストールが正常に動作するか