optimism icon indicating copy to clipboard operation
optimism copied to clipboard

Switch formatter from prettier to biome

Open roninjin10 opened this issue 1 year ago • 5 comments

Description

This task is an easy good first issue to replace prettier formatting for JavaScript files with biome.

An example of using biome can be found here

Note: This does not include linting! Though we may switch to biome for linting in future for now we don't want to because it will not have many of the linting rules we currently have turned on via eslint. We only want to use biome format as a prettier replacement

Tasks

  • [ ] Add biome
  • [ ] Remove prettier
  • [ ] Configure biome so it is maximally equivalent to existing prettier formatting. Create smallest diff possible in the actual source code

roninjin10 avatar Dec 01 '23 23:12 roninjin10

I wonder what it would take to use biome for linting

tynes avatar Dec 03 '23 02:12 tynes

We could use it for linting and I would actually recommend it. It does not have EVERY rule we have in our eslint config but it has all the ones that actually matter.

I personally use biome for linting and formatting on all projects these days and it's blazingly fast even on large monorepos image

roninjin10 avatar Dec 03 '23 10:12 roninjin10

I would def prefer removing eslint in favor of biome to reduce the number of deps that we depend on. If it has all the rules that matters, then I would be supportive of using it

tynes avatar Dec 06 '23 01:12 tynes

Hi @tynes ! Did some digging around, there are some rules which are simply unavailable. If there's a list of absolutely required ∩ unavailable rules, I could open a PR with biomejs and get it accepted or work off of a fork. Are there any such rules? I'd love to get this closed. :)

AbhinavMir avatar Feb 07 '24 07:02 AbhinavMir