@amedia/biome-config
v2.2.0
Published
Combined Biome config for Amedia
Maintainers
Keywords
Readme
@amedia/biome-config
Amedia's shared Biome configuration.
Install
npm install --save-dev @amedia/biome-config @biomejs/biomeUse
// biome.json
{
"$schema": "https://biomejs.dev/schemas/2.6.3/schema.json",
"extends": ["@amedia/biome-config"]
}Notes
Experimental — talk to #fag-front before adopting in production. Requires
Node 22+ and Biome 2.6+. Usually consumed via @amedia/kragl-biome.
Mirrors @amedia/eslint-config and @amedia/prettier-config as far as Biome
allows. Biome has no equivalent for these rules, so they are not covered:
strict, no-delete-var, no-invalid-regexp, no-octal,
no-unexpected-multiline, the import-x/* rules (Biome's import sorting
replaces import-x/order), most eslint-plugin-svelte rules, and a few
@eslint-react and eslint-plugin-jest rules.
ESLint switches its TypeScript, React and Jest rules on per project. Biome can't do that, so this config scopes them by file extension:
- TypeScript:
*.ts,*.tsx,*.mtsand*.cts. - React:
*.jsxand*.tsx. - Tests:
*.test.*and*.spec.*, with the Vitest and Jest globals.
The formatter is set up so that Biome leaves Prettier-formatted files as they are:
- Markdown is not formatted. Biome's Markdown formatter differs from Prettier
in ways no option controls: it rewrites
===and---headings as#headings, re-indents list items, escapes**and reformats code blocks and frontmatter. Frontmatter is still parsed, so the linter reads it correctly. - YAML keeps Prettier's spacing:
{ key: value }, but[item]. - CSS with Tailwind 4 directives (
@theme,@plugin, ...) is parsed instead of rejected.
Some differences remain because Biome has no option for them, mostly in
TypeScript type layout, font shorthands (12px/1.5 becomes 12px / 1.5)
and comment indentation in CSS. Biome also refuses legacy CSS hacks such as
*zoom and filter: alpha(opacity=0), which Prettier formats.
In Svelte, Astro and Vue files, the unused-variable and unused-import rules are off because Biome can't see what the template uses.
