Skip to content

Conversation

tyilo
Copy link
Contributor

@tyilo tyilo commented Aug 20, 2025

Fixes #58

@ematipico
Copy link
Member

I don't think this is a good idea. There might be users that want and accepts warnings in their code.

@tyilo
Copy link
Contributor Author

tyilo commented Aug 20, 2025

I don't think this is a good idea. There might be users that want and accepts warnings in their code.

I don't really see the use-case for running biome lint with pre-commit without this flag. pre-commit won't even show the warnings with a 0 exit code, so I think this makes the hook useless.

Furthermore, the default pre-commit handlers for other linters defaults to failing when there is an unfixed lint.

If the user really wants to have warnings in their code then I don't think pre-commit is the right tool, as the warnings won't even be shown. However, if there is some weird use-case, they can override the entrypoint in their pre-commit config.

@ematipico
Copy link
Member

ematipico commented Aug 22, 2025

Still, Biome emits warnings that sometimes fall outside the linter's ecosphere, meaning users can't control them directly until they are fixed. This means that every time we decide to emit a warning, this will fail. For example, we recently landed an update where we emit a internal diagnostic, a warning one, which isn't easily fixable. This could cause a DX friction to the tool.

As you said, users can customise the entrypoint, so for now you can do that too, until we (the team) decides how we should handle our internal diagnostics.

@tyilo
Copy link
Contributor Author

tyilo commented Aug 22, 2025

Still, Biome emits warnings that sometimes fall outside the linter's ecosphere, meaning users can't control them directly until they are fixed. This means that every time we decide to emit a warning, this will fail. For example, we recently landed an update where we emit a internal diagnostic, a warning one, which isn't easily fixable. This could cause a DX friction to the tool.

Fair enough. Is there another flag for only exiting with a non-zero exit code when there are lints?
Or maybe biome should by default have a non-zero exit code, when there are lints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

biome-check hook doesn't fail when there are lints

2 participants