Allow a fully configurable 'warning level/type' system. #4753
dwjohnston
started this conversation in
Ideas
Replies: 1 comment
-
As for the last request, you can already do so: https://biomejs.dev/linter/#disable-a-rule You set rules to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For posterity - I've also requested this kind of feature of eslint here
Related discussions:
#339
#3106
The fairly common scenario I've encountered is that we have a large codebase with some existing linting rules.
We now want to introduce a new rule to our codebase, and we know that say there are say 100 instances of this rule being broken.
So we don't want to introduce it at error level, because then our build will fail.
With eslint we can use the
--max-warnings
CLI option to incrementally decrease the warnings. We start with max-warnings 100, and as we address the infringements we ratchet down the max warnings until it's 0, and then we can switch it to error.So first ask would be that biome introduces a similar
--max-warnings
option.But the second part is that in a given code base we might already have dozens or hundreds of warnings, from all different rule infringements.
Now we could adopt a similar ratcheting strategy, but the the concern is that they all get treated equally. Someone might remove five easy to remove infringements and introduce four serious infringements.
So the second ask is to allow configuration of rules at any arbitrary levels, and have these configurable as to whether they cause an non-zero exit code when encountered. Another nice to have would be allowing for easy IDE configuration to configure different warning types with different colours/styles.
Beta Was this translation helpful? Give feedback.
All reactions