@rm30/biome-config
v0.1.0
Published
The shared RM30 Biome configuration — lint and format, replacing ESLint and Prettier.
Maintainers
Readme
@rm30/biome-config
The shared RM30 Biome configuration — lint and format, in one tool, replacing ESLint and Prettier.
Install
pnpm add -D @biomejs/biome @rm30/biome-configThen, at the repo root:
{
"$schema": "https://biomejs.dev/schemas/2.5.12/schema.json",
"extends": ["@rm30/biome-config"]
}Replace lint, lint:fix, format and format:check with:
{
"check": "biome check .",
"check:fix": "biome check --write ."
}What it sets
Formatter — 140 columns, 2 spaces, single quotes, no semicolons, ES5 trailing commas, always-parenthesised arrow params, LF line endings.
LF is deliberate. Prettier's endOfLine: "auto" preserved whatever a file already
had; Biome's auto forces the platform's, which would rewrite every file to CRLF on a
Windows checkout and fight CI on the next pass. Git stores LF regardless. JSON formatting is off:
those files are maintained by hand.
Linter — Biome's recommended set, plus:
| Rule | Level | Why |
|---|---|---|
| noUnusedVariables, noUnusedImports, noUnusedFunctionParameters | error | Identifiers prefixed with _ are ignored, as before. |
| noExplicitAny | warn | |
| noEmptyInterface, noBannedTypes | warn | |
| noConsole (allowing warn, error) | warn | Use a logger. |
Import sorting is Biome's own organizer, via the assist actions.
Domains are left to Biome's detection: it enables the next, react, reactNative,
drizzle, tailwind, turborepo and test rule sets per package, from the dependencies
that package declares. In a monorepo this resolves per package.json, so a Next app and
an Expo app in one repo each get the right rules without configuration.
The one known gap
Tailwind class sorting. Biome's useSortedClasses is still nursery and only understands
the default Tailwind config, while every RM30 project runs v4 with its own custom scales. Standard utilities still sort; custom tokens will not order
optimally. This is cosmetic, it is the only gap, and it is accepted — keeping Prettier
alive for it alone would forfeit the point of the migration.
Solidity is not covered; solhint stays separate, as it already was.
Why Biome and not ESLint
typescript-eslint supports >=4.8.4 <6.1.0. TypeScript 7 ships without a stable
programmatic API, and every type-aware typescript-eslint rule is built against that API —
so staying on ESLint means never adopting TypeScript 7. Biome parses and infers in Rust
and never loads the TS API.
Biome is the precondition for TypeScript 7, not a parallel nice-to-have.
Overriding
Project-specific rules stay in the project, visible:
{
"extends": ["@rm30/biome-config"],
"linter": {
"rules": {
"style": {
"noRestrictedImports": {
"level": "error",
"options": { "patterns": [{ "group": ["../features/*"], "message": "Cross-feature imports go through the feature's index." }] }
}
}
}
}
}