Change which rules are unsafe for precommit hooks #7082
Unanswered
richardgill
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to have different biome rules in my IDE and my lefthook pre-commit hook.
lint/correctness/noUnusedImports
on save.Currently I have
lint/correctness/noUnusedImports
marked as unsafe.So to fix it I have to run:
biome check --write --unsafe
, but this will fix many other unsafe things, which I don't want.I tried creating a
biome.precommit.jsonc
(adjacent tobiome.jsonc
):And running
biome check --write --unsafe --config=./biome.precommit.jsonc
This fails with:
How can I achieve what I want? I think perhaps this is a bug in biome when running with
--config
?Beta Was this translation helpful? Give feedback.
All reactions