-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
feat: biome lint #4853
feat: biome lint #4853
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
6975268
to
6489971
Compare
If we're happy with this, we could eventually apply it to frontend as well. |
Tested locally. Uh.... wow.... that's fast |
Both of these seem like really low risk, high value trade-offs to me. |
I love the idea of this! But wait, it replaces both eslint and prettier? I thought it was just a linter. But I don't mind 😄 |
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.
Overall, I like the recommendations, I love the speed boost, and I'm curious why frontend didn't get any recommendations.
I think this is a reversible decision (despite the many lines of code changed), so I'd in favor of trying it out
@@ -633,7 +633,7 @@ export default class StateService { | |||
async importTagTypes( | |||
tagTypes: ITagType[], | |||
keepExisting: boolean, | |||
oldTagTypes: ITagType[] = [], // eslint-disable-line |
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.
I believe same comment as in the other parameter with a default value and // eslint-disable-line
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.
Oh, I'm very intrigued now... this was added by renovate bot! https://github.com/Unleash/unleash/pull/1147/files#diff-8757be4693afd352b1e0507343d2de88066e2d8ec2f453a11be93920b9d0b182L599
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.
That's very odd.
6489971
to
e883233
Compare
Yeah, reading the history of Rome from Meta, before it became biome, it seems like they're also planning on a jest compatible test runner, but the buy in for now is for formatter and linter, though using the config we can turn off parts |
So, @gastonfournier frontend did not get any changes because the base setup in root folder only touches src folder, frontend has a separate setup in its package json. Different PR. Enough changes here already |
I can imagine! It crossed my mind that this could be a reason 👍 |
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.
LGTM - Let's try it out!
Follows up on #4853 to add Biome to the frontend as well. ![image](https://github.com/Unleash/unleash/assets/14320932/1906faf1-fc29-4172-a4d4-b2716d72cd65) Added a few `biome-ignore` to speed up the process but we may want to check and fix them in the future.
This PR changes our linter/formatter to biome (https://biomejs.dev/)
Causing our prehook to run almost instantly, and our "yarn lint" task to run in sub 100ms.
Some trade-offs:
The configuration set for biome also has a set of recommended rules, this is turned on by default, in order to get to something that was mergeable I have turned off a couple the rules we seemed to violate the most, that we also explicitly told eslint to ignore.