feat(claude-code): add project settings and commands

- Add .claude/settings.json with permissions and hooks
- Add /format-lessons slash command
- Add .claude/settings.local.json to .gitignore
This commit is contained in:
2026-01-07 14:13:59 +01:00
parent 11f86c71f3
commit b1ab23b579
3 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
Format all lesson JSON files including localized versions.
Run prettier on all lesson files:
```bash
npx prettier --write "lessons/**/*.json"
```
This formats both root lessons (`lessons/*.json`) and localized lessons (`lessons/ar/`, `lessons/de/`, `lessons/es/`, `lessons/pl/`, `lessons/uk/`).

29
.claude/settings.json Normal file
View File

@@ -0,0 +1,29 @@
{
"permissions": {
"allow": [
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(git push:*)",
"Bash(npm run build:*)",
"Bash(grep:*)",
"Bash(npm run format.lessons:*)",
"Bash(xargs:*)",
"Bash(cat:*)",
"Bash(prettier --write:*)"
],
"deny": ["Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)"]
},
"hooks": {
"PostToolUse": [
{
"matcher": "Write(lessons/**/*.json)",
"hooks": [
{
"type": "command",
"command": "npm run format.lessons 2>/dev/null || true"
}
]
}
]
}
}

5
.gitignore vendored
View File

@@ -2,4 +2,7 @@
.code
node_modules
dist
coverage
coverage
# Claude Code local settings (user-specific)
.claude/settings.local.json