- Moved all hookify configuration files from `.claude/` to `.claude/hooks/` subdirectory for better organization - Added four new blocking hooks to prevent common error handling anti-patterns: - `block-broad-exception-handler`: Prevents catching generic `Exception` with only logging - `block-datetime-now-fallback`: Blocks returning `datetime.now()` as fallback on parse failures to prevent data corruption - `block-default
1.4 KiB
1.4 KiB
name, enabled, event, action, pattern
| name | enabled | event | action | pattern |
|---|---|---|---|---|
| block-linter-config-frontend-bash | true | bash | block | (rm|mv|cp|sed|awk|chmod|chown|touch|truncate|tee|>|>>)\s.*client/.*(?:biome.json|tsconfig.json|.?eslint(?:rc|.config)|.?prettier(?:rc|.config)|.?rustfmt.toml|.?clippy.toml) |
BLOCKED: Frontend Linter Configuration (Bash)
Bash commands that modify frontend linter/formatter configs in client/ are not allowed.
Why This Is Blocked
- Frontend linter configurations (TypeScript, Rust) are carefully tuned for this project
- Commands like
rm,mv,cp,sed,echo >, etc. targeting these files are prohibited - Changes require explicit user approval
Protected Files
TypeScript/JavaScript:
biome.jsontsconfig.jsoneslint.config.js/.eslintrc*.prettierrc*/prettier.config.*
Rust:
.rustfmt.toml/rustfmt.toml.clippy.toml/clippy.toml
Allowed Operations
cat client/biome.json- viewing file contentsls client/- listing files- Running linters:
npm run lint,make clippy
Blocked Operations
- Any command that would create, modify, or delete these config files
- Redirecting output to these files
- Moving or copying over these files
If You Need to Modify Linter Settings
- Ask the user for explicit permission
- Explain what change is needed and why
- Wait for approval before proceeding
This rule cannot be bypassed.