-
-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hey! Following up on my tweet you liked π
The problem
Ultracite sets noUnusedImports: { fix: "safe" } in the core config. This causes a race condition when using Claude Code with a PostToolUse hook that runs ultracite fix:
- Claude adds an import via Edit tool
- PostToolUse hook fires, runs
ultracite fix - Import gets removed (it's "unused" - the usage hasn't landed yet)
- Claude's next edit adds the usage... but the import is gone π
Workaround
Setting fix: "unsafe" in my local biome.jsonc fixes it:
The hook then skips the fix (unsafe fixes need --unsafe true), but I can still clean up manually when needed.
Suggestion
Would it make sense to change the default to fix: "unsafe"? I think that's actually Biome's default behavior anyway. Safe fixes are nice in theory but the AI tooling race condition is pretty painful.
Happy to hear if there's a better approach I'm missing!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working