Skip to content

chore(maintenance): add biome to the project #2791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2024
Merged

chore(maintenance): add biome to the project #2791

merged 2 commits into from
Jul 22, 2024

Conversation

dreamorosi
Copy link
Contributor

@dreamorosi dreamorosi commented Jul 22, 2024

Summary

Changes

Please provide a summary of what's being changed

This PR introduces @biomejs/biome as development dependency to the project as well as a new biome.json file that holds the configuration for the tool.

The configuration used for Biome is roughly equivalent with the eslint/prettier one that we are already using, except a couple notable differences:

  • No support for function return type - as of today we have a Eslint rule that reminds us to set the return type of each function. This rule is not yet supported in Biome (see linked issue). The rule seems to be in demand, so there's a chance it will be implemented at some point, in the meanwhile we'll rely on TypeScript and code reviews.
  • Standardized import order
  • Force type usage when importing a type

There might be other subtle differences due to Biome being stricter and/or more opinionated than the tools we are already using. We'll refactor the code to use these new conventions as we migrate to the tool.

This is the first of a series of PRs (~10) that will off board each one of the packages in this repo from eslint/prettier to Biome. Once this work is complete we'll be able to remove about 10 direct dependencies; this will lessen our maintenance burden in maintaining them up to date.


As part of this PR I have migrated the examples/app workspace to use Biome. The changes for this project are minimal.

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: #2790


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@dreamorosi dreamorosi self-assigned this Jul 22, 2024
@dreamorosi dreamorosi requested a review from a team July 22, 2024 14:10
@dreamorosi dreamorosi requested a review from a team as a code owner July 22, 2024 14:10
@boring-cyborg boring-cyborg bot added dependencies Changes that touch dependencies, e.g. Dependabot, etc. documentation Improvements or additions to documentation labels Jul 22, 2024
@pull-request-size pull-request-size bot added the size/M PR between 30-99 LOC label Jul 22, 2024
@dreamorosi dreamorosi linked an issue Jul 22, 2024 that may be closed by this pull request
2 tasks
Copy link

@dreamorosi dreamorosi merged commit 5910bd4 into main Jul 22, 2024
19 checks passed
@dreamorosi dreamorosi deleted the chore/biome branch July 22, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Changes that touch dependencies, e.g. Dependabot, etc. documentation Improvements or additions to documentation size/M PR between 30-99 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: add biome to project
2 participants