lint-staged とは?
lint-staged は、プロジェクト全体ではなく、現在Gitでstageされているファイルに対してのみ、linterやフォーマッタなどの設定されたコマンドを実行するツールです。チェックを高速に保つため、一般的に pre-commit hook に組み込まれます。大きなリポジトリでも、ローカルの品質ゲートの応答性を保ちます。
なぜ重要か
コミットごとに大きなコードベース全体をlintするのはhookとして維持するには遅すぎるため、人々はそれを無効化してしまいます。lint-staged は作業を変更されたファイルだけに絞り込み、pre-commit チェックを有効にしておけるほど高速に保ちます。これにより、コミットの流れを遅くすることなく、一貫したローカルでの強制が実用的になります。
関連ガイド
What Is a Husky Hook?A Husky hook is a Git hook managed by the Husky tool, letting a project run checks like linting or tests auto…
What Is commitlint?commitlint is a tool that checks commit messages against a configured convention, rejecting commits that do n…
What Is a Code Quality Report?A code quality report is a pipeline artifact summarizing maintainability issues, like complexity and duplicat…