Skip to content

Commit 462525e

Browse files
committed
feat: add configuration for PostToolUse hook to format TypeScript files with Prettier
1 parent 708188a commit 462525e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"matcher": "Edit|Write",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "jq -r '.tool_input.file_path // empty' | grep -E '\\.(ts|tsx)$' | xargs -r npx prettier --write"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

0 commit comments

Comments
 (0)