Date: 2024-02-14
Accepted
As documented in the dxw tech team RFC Use linting tools across all of our projects, we use linters and formatters to ensure a standard approach to the way our code is structured within files.
For JavaScript and TypeScript, we often use some combination of ESLint, Standard, and Prettier for these purposes, and had been using ESLint and Prettier here. However, we've encountered issues getting this to play nice with Bun in various local development environments, and experiments with Standard have also proved problematic.
While setting the codebase up to work with a particular set of rules is often the bulk of the work with linters (rather than ongoing maintenance), the issues we've encountered on this project have taken time away from more interesting experiments with state machines, WebSockets, and so on.
Biome is a relatively new linter and formatter. Having been built in Rust, it's highly performant. It provides a substantial set of linting rules by default, many of which come from ESLint or ESLint plugins, and has a similar philosophy to Prettier on opinionated formatting (limited configuration).
We will use Biome for linting and formatting our TypeScript and JSON files.
- We will have fewer decisions to make about what linting and formatting rules to apply
- We may be unable to use some of the more niche ESLint rules or third-party plugins
- We should be able to revert/switch to another linter/formatter if we encounter issues