Replies: 1 comment 2 replies
-
There's one important thing that this RFC doesn't address.
It's an important distinction, so we can't remove |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Biome provides several ways to tune the behavior of tools for a given set of files. We can now use
.gitignore
files, globalinclude
/ignore
, by-toolinclude
/ignore
, and granularoverrides
. The resulting configuration schema is pretty complex and can be confusing when these features are used together.This RFC proposes to get rid of some of these features to improve configuration composability and simplify the overall configuration.
Proposal
Users have repeatedly asked for a way to control which files are ignored or included when formatting and linting. We initially only provided a global
files.{include,ignore}
properties to specify which files got formatted and linted and a way to override the selected for a given tool ({linter,formatter,organizeImports}.{include,ignore}
). Note that we can also pass a set of files via command line arguments.In response to user requests, we later added support for
.gitignore
files (vcs.useIgnoreFile
). We also added support for extending another configurationextends
and we adopted the granular configuration proposal that allows to override the formatter configuration for a given language ({javascript,json}.formatter
) and to apply custom configurations to set of files (overrides
).The resulting configuration provides multiple ways to achieve the same thing and led to numerous bugs around overriding behaviors. Also, if the user uses both
{files,formatter,linter}.{include,ignore}
andoverrides
, this can lead to pretty complex configurations.To reduce this complexity and improve composability, I suggest getting rid of
{files,formatter,linter,organizeImports}.{include,ignore}
.Alternative proposal
Alternatively we could get rid of
{formatter,linter,organizeImports}.{include,ignore}
, and move{files}.{include,ignore}
to the top.Migration plan
Before getting rid of
{files,formatter,linter,organizeImports}.{include,ignore}
properties, we should first deprecate them and provide an automatic migration viabiome migrate
.For instance, let's assume that the user have this configuration:
The migration tool could convert the configuration to:
One difficulty could be the presence of both
files.{include,ignore}}
and{formatter,linter}.{include,ignore}
. In this case we have to merge the selectors.For instance, let's assume that the user have this configuration:
Should certainly generate something like:
Beta Was this translation helpful? Give feedback.
All reactions