-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
build: replace prettier with biome #61397
Conversation
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Is there a reason we did not merge this? (Or the other one) |
I couldn't find anybody to land this and later help me track the health of the release, in case there is a bug. |
Summary
This PR replaces Prettier and several Eslint rules with Biome for reduced CI times for faster linting & formatting. Linting and formatting now takes 44 seconds, compared to
master
branch with 95 seconds.Here's a list of caveats with the proposed changes:
biome-ignore format
in several files. The issues are tracked on Biome repository.eslint-config-sentry
requires and installsprettier
. Therefore, removing fromsentry
repository package.json causes an error. We eventually need to makeprettier
optional in the upstream repository.Why Biome?
I recommend reading the Philosophy behind Biome.
eslint-config-sentry
we should share Biome config.Impact
Before
Duration
It takes 95 seconds to run
yarn lint
which includes prettier with eslint. In orderTime consuming Eslint rules
The following shows the top 10 most time spent rules in Eslint. In order to reproduce the following on your local, please run
TIMING=10 yarn lint
After
Duration
It takes 44 seconds to run
yarn lint
command, and only 531ms is spent on Biome. Ideally moving more linting rules to Biome will reduce the linting speed.Remaining Eslint rules
The following shows the top 10 most time spent rules in Eslint. In order to reproduce the following on your local, please run
TIMING=10 yarn lint:js