🔨 Rework hooks for Claude Code#6872
Conversation
|
|
@claude is it correct. maybe you can confirm by reading https://code.claude.com/docs/en/hooks#hooks-reference |
|
Claude finished @dubzzz's task in 1m 54s —— View job Verifying hooks configuration against official docs
VerdictThe change from The overall hooks structure in your
One potential issue
Previously this didn't matter because You'll want to add |
@fast-check/ava
fast-check
@fast-check/jest
@fast-check/packaged
@fast-check/poisoning
@fast-check/vitest
@fast-check/worker
commit: |
There was a problem hiding this comment.
Pull request overview
This PR updates the Claude Code hook configuration to invoke hook scripts using an absolute project-root-based path via $CLAUDE_PROJECT_DIR, instead of calling them via bash with a relative path.
Changes:
- Updated all Claude hook
commandentries to use"$CLAUDE_PROJECT_DIR"/.claude/*.sh - Removed explicit
bashinvocation from hook commands (now relying on direct script execution)
| { | ||
| "type": "command", | ||
| "command": "bash .claude/session-start.sh" | ||
| "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/session-start.sh" |
| { | ||
| "type": "command", | ||
| "command": "bash .claude/npm-to-pnpm.sh" | ||
| "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/npm-to-pnpm.sh" |
| { | ||
| "type": "command", | ||
| "command": "bash .claude/format-file.sh" | ||
| "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/format-file.sh" |
| { | ||
| "type": "command", | ||
| "command": "bash .claude/check-code.sh" | ||
| "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/check-code.sh" |
|
@claude edit pr description following pr template |
|
Claude finished @dubzzz's task in 56s —— View job Updating PR description to follow template
Updated the PR description to follow the template from
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6872 +/- ##
=======================================
Coverage 94.75% 94.75%
=======================================
Files 211 211
Lines 5778 5778
Branches 1527 1527
=======================================
Hits 5475 5475
Misses 295 295
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Rework Claude Code hook commands to use absolute paths via
$CLAUDE_PROJECT_DIRinstead of relative paths with explicitbashinvocation. This ensures hooks resolve to the correct script path regardless of the current working directory.Also makes
.claude/npm-to-pnpm.shexecutable so it can be invoked directly without an explicitbashprefix.Checklist
— Don't delete this checklist and make sure you do the following before opening the PR
pnpm run bumpor by following the instructions from the changeset bot🐛(vitest) Something...) when the change targets a package other thanfast-check