feat: provide Biome configuration #1717
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Biome is an increasingly popular piece of tooling that aims to replace formatters such as Prettier and linters such as ESLint. Written in Rust, it provides a solid performance gain over the tools it seeks to replace, and as such can be quite valuable for contributors who leverage it.
I already use Biome in my fork, both for formatting and linting, however, it seriously messed up my document formatting relative to upstream due to diverging from the defaults. Provided a clean slate, I made a conservative biome config that adheres to existing code style and should reduce friction for those seeking to leverage Biome in the codebase. Linting features are disabled, but could be leveraged in the future for code refactoring, as I find its advice to be generally quite sound.
As the project still treats Prettier as the default, Biome is not included in the dependencies (the config can still be leveraged via
npx
or through editor extensions). I think it should probably be mentioned somewhere that the code should still go throughformat
command in case Biome's formatting diverges from Prettier's overall.