Skip to content

Switch to Biome #6838

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 11 commits into from
Jun 30, 2024
Merged

Switch to Biome #6838

merged 11 commits into from
Jun 30, 2024

Conversation

cometkim
Copy link
Member

@cometkim cometkim commented Jun 28, 2024

  • Compatible with Prettier's formatting rules
  • Can lint
  • Can organize imports
  • Much faster than Prettier, even when performing formatting, linting, and import sorting altogether.
  • A better editor experience because it allows partial errors.
  • Integrated with Git and check only changes without additional tools.
  • Healthier maintenance

@cknitt
Copy link
Member

cknitt commented Jun 29, 2024

That does look nice! Is there any downside to it (other than people being unfamiliar with it)?

@cometkim
Copy link
Member Author

I don't think so. It can be compared to ESLint in terms of ecosystem, but not to Prettier.

People who are already using the Prettier extension should switch to the Biome extension.

@cometkim
Copy link
Member Author

cometkim commented Jun 29, 2024

Btw, do we need to enable the linter rules & import sorting feature too?

@cknitt
Copy link
Member

cknitt commented Jun 29, 2024

Btw, do we need to enable the linter rules & import sorting feature too?

Would certainly be nice to help us cleaning up / modernizing the JS files.

But that can also be done later - fine with me to merge only the formatting part now. (Is it ready to merge - as the PR is still in draft?)

@cometkim
Copy link
Member Author

The CI now only checks for changes, so I ran npm run format:all once.

Formatted 126 files in 73ms. Fixed 18 files.
Found 4 errors.

sooo fast 👍 (errors were comments in JSON files)

@cometkim cometkim marked this pull request as ready for review June 29, 2024 18:00
@cometkim
Copy link
Member Author

Ohh, the gentype test includes ESLint.

We can replace it with Biome check. Wait for it...

@cometkim
Copy link
Member Author

Done!

@cknitt
Copy link
Member

cknitt commented Jun 29, 2024

Merged your other PR #6831 in the meantime, and now this one has a conflict.

@cometkim
Copy link
Member Author

rebased

@cknitt cknitt merged commit dd4a4bf into rescript-lang:master Jun 30, 2024
19 checks passed
@cometkim cometkim deleted the js-formatter branch June 30, 2024 06:55
@cristianoc
Copy link
Collaborator

make format and make checkformat should also call this I think, not just the ocaml dune format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants