Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .claude/hooks/post-edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ else
pnpm exec prettier --write "$FILE_PATH" 2>/dev/null
fi

# Auto-fix eslint-fixable issues (import order, prefer-const, etc.) on the edited file.
# This corrects fixable warnings that the report-only lint pass below would otherwise
# leave in place (import/order is a warning, so it never fails lint but does clutter diffs).
if [[ -n "$PACKAGE_DIR" ]]; then
(cd "$PACKAGE_DIR" && pnpm exec eslint --fix "$FILE_PATH" 2>/dev/null)
fi

# Run lint from the package directory using the project's lint setup
if [[ -n "$PACKAGE_DIR" ]]; then
LINT_OUTPUT=$(cd "$PACKAGE_DIR" && pnpm run lint 2>&1)
Expand Down
Loading