Linting with Biome¶
This starter kit uses Biome's linter instead of ESLint. The root configuration applies one rule set throughout the pnpm workspace.
Run the checks¶
Biome checks formatting, lint rules, and enabled source actions together. Read the diagnostic category to distinguish a formatting failure from a correctness warning.
Apply formatting and safe fixes with:
Unsafe fixes are not applied automatically. Review the diagnostic and change the code yourself when Biome marks a fix as unsafe.
Configuration¶
{
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
The recommended rules catch common correctness, suspicious-code, and maintainability problems. Import organization is enabled as a source action, so pnpm format may remove or reorder imports.
Tailwind directives are also enabled for CSS parsing:
Fix a diagnostic¶
Use this order:
- Read the rule name and explanation.
- Fix the code if the rule identified a real issue.
- Run
pnpm formatfor safe mechanical fixes. - Run
pnpm checkagain.
Do not disable a rule only to make the command green. If a recommended rule genuinely conflicts with the repository, add the narrowest root override and document why.
{
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "off"
}
}
}
}
Avoid package-local Biome files unless a package has a lasting and unavoidable difference.
Check one path¶
While iterating, Biome can check a smaller target:
Run the root pnpm check before finishing so unrelated workspace configuration is not missed.