@kcconfigs/biome
v3.0.0
Published
Shared biome configuration
Readme
@kcconfigs/biome
Shared Biome formatter, linter, and assist settings.
Prerequisites
- Biome: 2.0.0 or higher (as peer dependency)
Installation
pnpm add --save-dev @biomejs/biome @kcconfigs/biomeUsage
Add a biome.json (or biome.jsonc) that extends the default preset:
{
"$schema": "https://biomejs.dev/schemas/2.5.15/schema.json",
"extends": ["@kcconfigs/biome"]
}Integrate with vscode
I recommended to add following to .vscode/settings.json.
{
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit"
}
}Presets
| Name | Description |
| ----------------------- | --------------------------------------------------------------------------------------------- |
| @kcconfigs/biome | Default preset. Extends base and adds file includes/excludes plus useEditorconfig |
| @kcconfigs/biome/base | Bare preset with formatter, linter, and assist rules only, without workspace-specific filters |
The default preset excludes generated artifacts such as dist, .vitest, lock files, *.tsbuildinfo, and release-please manifests.
See default.json for the full list.
Use base when you need to own the include/exclude patterns yourself.
Formatter defaults
Inherited from base.json:
- Indent style: tab
- Indent width: 2
- Line width: 120
- Line ending: LF
- VCS integration: enabled, uses
.gitignore, default branchmain
The default preset also sets formatter.useEditorconfig to true,
so an .editorconfig in your repository takes precedence over the values above.
Test file relaxations
The default preset relaxes a few rules for **/*.test.*, **/*.spec.*,
and **/__mocks__/**:
complexity/useLiteralKeys: offsuspicious/noExplicitAny: offstyle/noNonNullAssertion: off
Example
Base preset with custom includes and a rule override:
{
"$schema": "https://biomejs.dev/schemas/2.5.15/schema.json",
"extends": ["@kcconfigs/biome/base"],
"files": { "includes": ["src/**/*.ts", "tests/**/*.ts"] },
"linter": {
"rules": {
"complexity": {
"noUselessSwitchCase": "warn"
}
}
}
}