mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
feat: auto-detect formatter in post-edit hook (Biome/Prettier)
The post-edit-format hook was hardcoded to use Prettier. Projects using Biome had their code reformatted with Prettier defaults (e.g. double quotes overwriting single quotes). Now the hook walks up from the edited file to find the project root, then checks for config files: - biome.json / biome.jsonc → runs Biome - .prettierrc / prettier.config.* → runs Prettier - Neither found → skips formatting silently
This commit is contained in:
parent
24047351c2
commit
4eb6fbdd3f
2 changed files with 64 additions and 11 deletions
|
|
@ -108,7 +108,7 @@
|
|||
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/post-edit-format.js\""
|
||||
}
|
||||
],
|
||||
"description": "Auto-format JS/TS files with Prettier after edits"
|
||||
"description": "Auto-format JS/TS files after edits (auto-detects Biome or Prettier)"
|
||||
},
|
||||
{
|
||||
"matcher": "Edit",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue