@repo/biome-config
Centralized Biome linter and formatter configuration.
@repo/biome-config provides a centralized Biome configuration for linting and formatting across the entire monorepo.
Usage
Extend the shared config in your app's biome.json:
{
"extends": ["@repo/biome-config/biome"]
}Formatter Settings
| Setting | Value |
|---|---|
| Indent style | Spaces |
| Indent width | 2 |
| Line width | 120 |
| Quote style | Single quotes |
| Semicolons | As needed (omitted where possible) |
Linter Rules
Global Rules
| Category | Rule | Severity |
|---|---|---|
| Complexity | noUselessTypeConstraint | Error |
| Correctness | noUnusedVariables | Error |
| Style | noCommonJs | Error |
| Style | noNamespace | Error |
| Style | useArrayLiterals | Error |
| Style | useAsConstAssertion | Error |
| Suspicious | noExplicitAny | Info |
| Suspicious | noTsIgnore | Info |
JSX/TSX Overrides
Additional rules are enabled for .js, .jsx, .ts, and .tsx files:
| Category | Rule | Severity |
|---|---|---|
| Accessibility | useAltText | Warn |
| Accessibility | useValidAriaProps | Warn |
| Correctness | noChildrenProp | Error |
| Correctness | useHookAtTopLevel | Error |
| Correctness | useJsxKeyInIterable | Error |
| Security | noDangerouslySetInnerHtmlWithChildren | Error |
TypeScript Overrides
For .ts, .tsx, .mts, and .cts files:
| Category | Rule | Severity |
|---|---|---|
| Complexity | noArguments | Error |
| Style | useConst | Error |
| Suspicious | noVar | Error |
Several TypeScript-handled rules are turned off to avoid duplicate checking (e.g., noConstAssign, noUnreachable).
CSS Settings
{
"css": {
"parser": { "tailwindDirectives": true },
"formatter": { "quoteStyle": "single" }
}
}Tailwind directives (@tailwind, @apply, etc.) are recognized by the parser.
Running Biome
From the monorepo root:
# Check (lint + format)
bun run format-and-lint
# Check with auto-fix
bun run format-and-lint:fix