ADR: Replace eslint and prettier with biome
This project currently uses eslint and prettier to lint and format the code, respectively. However, eslint pulls in an incredible number of dependencies (weighing ~70mb) and the integration with prettier is very difficult to keep working. In brief, it's just causing too much maintenance cost. We have experimented with switching to biome in several helpers and extensions and the results have been very encouraging. biome is an all-in-one linter and formatter that's distributed as a binary. I'd like to make the switch to biome in Antora as well to reduce overhead.
Switching to biome will result in some code formatting changes, but we don't expect there to be any functional changes. The test suite will verify this assertion.
Here's a summary of which files will be added, changed, or removed:
- added
- biome.json
- npm/postformat.js
- changed
- package.json
- package-lock.json
- numerous JavaScript files in lib and test directories of each package (formatting)
- removed
- .eslintrc
- .eslintignore
- npm/format.js
The npm/postformat.js script is needed since biome prefers to collapse the space between the name and parameter list of a function or method declaration. We prefer to keep it, so this script restores it.