optimism
optimism copied to clipboard
Switch formatter from prettier to biome
Description
This task is an easy good first issue to replace prettier formatting for JavaScript files with biome.
- Biome is 25x faster than prettier
- They recently reached the ability to be pretty prettier equivelent passing over 95% of the prettier test suite
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
I wonder what it would take to use biome for linting
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
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
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. :)