add official Biome support for linting and formatting #35462
sidharth-wetter
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, Nx provides first-class support for ESLint and Prettier. While these are industry standards, many teams are migrating to Biome for its significantly faster performance (Rust-based) and unified configuration (replacing both linter and formatter).
At present, using Biome with Nx requires significant manual effort and custom workarounds. Even when a workspace is migrated to Biome, running standard Nx generators often re-installs ESLint and Prettier dependencies or creates .eslintrc.json files that must be manually deleted.
Motivation
Performance: Biome is 10–20x faster than ESLint/Prettier. In large monorepos, linting/formatting often becomes a CI bottleneck.
Simplified Tooling: Replacing multiple tools (ESLint, Prettier, eslint-plugin-import, etc.) with a single tool reduces the "glue code" maintenance in an Nx workspace.
Developer Experience: New projects could be scaffolded with Biome from the start, avoiding the overhead of legacy JS-based tooling.
Suggested Implementation
I suggest the introduction of an official @nx/biome plugin with the following capabilities:
Executors:
@nx/biome:lint: A wrapper around biome lint.
@nx/biome:format: A wrapper around biome format.
@nx/biome:check: To run both (and import sorting) simultaneously.
Generators:
init: To set up a root biome.json and required dependencies.
configuration: To add Biome support to an existing project (similar to @nx/eslint:configuration).
Generator Integration: * Add a global or project-level option (e.g., linter: 'biome') to existing generators (like @nx/js:lib or @nx/nest:app) to prevent them from generating ESLint/Prettier files.
Module Boundaries:
The most critical feature of Nx is enforce-module-boundaries. An official integration should explore how to port this logic to Biome (potentially via a Biome plugin or a custom check using the Nx Graph) so that monorepo architecture can still be enforced without ESLint.
Alternate Implementations
Community Plugin: While community plugins exist, official support is preferred to ensure compatibility with core Nx generators and the affected command logic.
Hybrid Mode: Allow ESLint only for the @nx/enforce-module-boundaries rule while using Biome for everything else, though a pure Biome solution is the ultimate goal for speed.
Beta Was this translation helpful? Give feedback.
All reactions