From 89f9131f6c76a802e685c3d7561aa33b3b71f0c0 Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Wed, 10 Sep 2025 13:19:53 -0700 Subject: [PATCH] Add PostToolUse hook for automatic formatting (#563) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a PostToolUse hook that automatically runs `bun run format` after Edit, Write, or MultiEdit operations, similar to the Python SDK's ruff formatting hook. This ensures code is automatically formatted whenever changes are made. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- .claude/settings.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..187232f --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,15 @@ +{ + "hooks": { + "PostToolUse": [ + { + "hooks": [ + { + "type": "command", + "command": "bun run format" + } + ], + "matcher": "Edit|Write|MultiEdit" + } + ] + } +}