@nx-devkit/biome
v0.1.18
Published
Standalone Nx plugin: infers format, format-check, and lint targets from biome.json — no project.json required.
Downloads
3,200
Maintainers
Readme
@nx-devkit/biome
Standalone Nx plugin: any nested biome.json or biome.jsonc becomes a project with format, format-check, and lint targets. No project.json needed.
Part of nx-devkit. If you want the full TypeScript toolchain (typecheck, test, lint, format, build), use the @nx-devkit/typescript preset instead — it includes everything this plugin does.
Install
bun add -D @nx-devkit/biome @biomejs/biomeDepends on @nx/devkit ^22 || ^23 (installed automatically — nx itself comes from your workspace via devkit's peer range). Requires the @biomejs/biome ^2 peer.
Register
nx add @nx-devkit/biome # runs the init generator — registers the plugin in nx.jsonOr manually:
// nx.json
{ "plugins": ["@nx-devkit/biome"] }What it infers
| Target | Default command | Cacheable | Inputs |
|---|---|---|---|
| format | biome format --write . | no (mutates source) | the matched biome.json/biome.jsonc, **/* |
| format-check | biome format . | yes | the matched biome.json/biome.jsonc, **/* |
| lint | biome lint . | yes | the matched biome.json/biome.jsonc, **/* |
All run via nx:run-commands with cwd = the project root.
Inspect
npx nx show projects
npx nx show project <name>
npx nx run <name>:format-checkOptions
Pass via the plugin tuple in nx.json. Each option overrides the command string for one target:
{
"plugins": [
["@nx-devkit/biome", {
"formatCommand": "biome format --write .",
"formatCheckCommand": "biome format .",
"lintCommand": "biome lint ."
}]
]
}| Option | Default | Effect |
|---|---|---|
| formatCommand | biome format --write . | Command for the format target. |
| formatCheckCommand | biome format . | Command for the format-check target. |
| lintCommand | biome lint . | Command for the lint target. |
Skip rules
- Both
biome.jsonandbiome.jsoncare recognized. - Configs inside
node_modulesare skipped. - Configs that escape the workspace root are skipped.
- The workspace-root
biome.json{,c}is skipped — the plugin is for nested project roots.
License
MIT
