Propose first-class oxlint and oxfmt support in Nx #35480
gperdomor
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.
-
Summary
This proposal requests official support for oxlint and oxfmt within the Nx ecosystem. Similar to the current
@nx/eslintintegration, official support would include project inference, automated configuration, and specialized executors that take advantage of the performance benefits of the Rust-based oxc toolchain.Motivation
As monorepos grow, linting and formatting become significant CI bottlenecks. While Nx effectively mitigates this through caching and
affectedcommands, the raw execution time of Node.js-based tools like ESLint and Prettier remains a fundamental constraint.Three primary factors make official support timely:
1. Performance at scale
Benchmarks show that oxlint is 50-100x faster than ESLint. In a real-world monorepo environment with 5,360 files, oxlint completes in 1.3 seconds compared to 147 seconds for ESLint — a 113x speedup. Similarly, oxfmt provides a 30-35x performance increase over Prettier while maintaining 100% compatibility with Prettier's JS/TS conformance tests. Official integration would allow Nx users to reclaim significant CI time and improve the developer experience during local pre-commit hooks.
2. Rust-based toolchain alignment
The Nx ecosystem is already shifting toward high-performance Rust tooling. Nx has long supported SWC as a first-class compiler option, and integration for Rolldown is on the horizon. Adding oxc-based tools (oxlint and oxfmt) fits this trajectory perfectly. Providing a unified Rust-powered stack for compilation, linting, and formatting ensures the Nx toolchain remains the fastest available for modern TypeScript development.
3. Simpler configuration
ESLint configuration, particularly the transition to flat configs and the management of complex plugin ecosystems, involves significant ceremony. oxlint provides 756 built-in rules (including 59/61 from typescript-eslint) with no Node.js overhead. It operates as a standalone binary that requires less maintenance and fewer dependencies than the traditional ESLint/Prettier setup. Official Nx support would allow for a "zero-config" experience through project inference.
Proposal
We propose the introduction of a new plugin, or an expansion of existing capabilities, to include:
CreateNodesV2implementation that detects.oxlintrc.jsonoroxlint.config.tsand automatically adds alinttarget to the project.nx format:checkandnx format:write. This would include a migration path from existing.prettierrcfiles usingoxfmt --migrate prettier.oxlintandoxfmtas their default linter and formatter during project initialization.cacheableOperationsandinputsfor oxc-based tasks.Why Official Support Now?
When issue #21384 was previously discussed, the recommendation was to rely on community plugins. However, the landscape has changed significantly:
typescript-eslint.nx-oxlintplugin exists but lacks formatter support and deep integration with Nx's core formatting utilities. Official support would ensure thatnx formatcommands can leverage oxfmt's speed across the entire workspace.Prior Art
Migration Path
A phased approach:
nx format.oxlintto run alongside ESLint for correctness rules, eventually providing a generator to migrateeslint.config.mjsrules to.oxlintrc.json.References
Beta Was this translation helpful? Give feedback.
All reactions