Skip to content
Draft
11 changes: 11 additions & 0 deletions astro-docs/sidebar.mts
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ const technologiesGroups: SidebarItems = [
link: 'technologies/module-federation/introduction',
},
{ label: 'ESLint', link: 'technologies/eslint/introduction' },
{ label: 'Oxlint', link: 'technologies/oxlint/introduction' },
],
},
{
Expand Down Expand Up @@ -967,6 +968,11 @@ const knowledgeBaseGroups: SidebarItems = [
...getTechnologyKBItems('eslint-plugin', 'eslint'),
],
},
{
label: 'Oxlint',
collapsed: true,
items: [...getTechnologyKBItems('oxlint')],
},
{
label: 'Vite',
collapsed: true,
Expand Down Expand Up @@ -1103,6 +1109,11 @@ const referenceGroups: SidebarItems = [
...getTechnologyAPIItems('eslint-plugin', 'eslint', 'ESLint Plugin'),
],
},
{
label: 'Oxlint',
collapsed: true,
items: [...getTechnologyAPIItems('oxlint', undefined, 'Oxlint')],
},
{
label: 'Webpack',
collapsed: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ tagged with "scoped:shared" or "scope:admin".

Read more about [ESLint rule options](/docs/technologies/eslint/eslint-plugin/guides/enforce-module-boundaries).

{% /tabitem %}
{% tabitem label="Oxlint" %}

If you're using `@nx/oxlint` instead of ESLint, configure `@nx/oxlint/boundaries-plugin` and `@nx/enforce-module-boundaries` in `.oxlintrc.json` (see [Oxlint module boundaries bridge](/docs/technologies/oxlint/introduction#experimental-module-boundaries-bridge)).

{% /tabitem %}
{% tabitem label="Conformance" %}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Oxlint
description: Oxlint guides and best practices for Nx workspaces
sidebar:
hidden: true
pagefind: false
---

{% sidebar_group_cards group="Knowledge Base/Oxlint" /%}
9 changes: 9 additions & 0 deletions astro-docs/src/content/docs/technologies/oxlint/index.mdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Oxlint
sidebar:
hidden: true
description: Guides and API references for Oxlint in Nx
pagefind: false
---

{% index_page_cards path="technologies/oxlint" /%}
111 changes: 111 additions & 0 deletions astro-docs/src/content/docs/technologies/oxlint/introduction.mdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: Oxlint Plugin for Nx
description: Learn how to set up and use the @nx/oxlint plugin with inferred tasks, hybrid migration, and experimental module-boundary enforcement.
sidebar:
label: Introduction
filter: 'type:References'
---

The `@nx/oxlint` plugin integrates [Oxlint](https://oxc.rs/docs/guide/usage/linter/) with Nx for fast lint execution in monorepos.

## Experimental status

{% aside type="note" title="Experimental" %}
`@nx/oxlint` and the Oxlint JS-plugin boundary bridge are experimental.
The feature set may evolve quickly while Oxlint JS plugins are still stabilizing.
{% /aside %}

## Setup

Install the plugin:

```shell
nx add @nx/oxlint
```

This registers `@nx/oxlint/plugin` (when inference plugins are enabled), installs `oxlint`, and creates a root `.oxlintrc.json` if needed.

## Inferred tasks

`@nx/oxlint/plugin` infers tasks from Oxlint config files:

- `.oxlintrc.json`
- `.oxlintrc.jsonc`
- `oxlint.config.ts`

The plugin infers command-based targets and configures caching using Nx inputs.

You can view inferred tasks with:

```shell
nx show project my-project --web
```

## Target naming in hybrid workspaces

For mixed ESLint + Oxlint workspaces, Nx attempts to avoid target collisions.
When adding the plugin, it tries target names in this order:

1. `lint`
2. `oxlint`
3. `oxlint:lint`
4. `oxlint-lint`

This enables incremental migration without removing ESLint.

## Explicit target fallback

If `useInferencePlugins` is disabled, use explicit targets with `@nx/oxlint:lint`:

```json
{
"targets": {
"oxlint": {
"executor": "@nx/oxlint:lint",
"options": {
"lintFilePatterns": ["{projectRoot}"]
}
}
}
}
```

## Hybrid migration from ESLint

Use the migration helper to register Oxlint while keeping ESLint targets intact:

```shell
nx g @nx/oxlint:convert-from-eslint
```

By default this adds an `oxlint` target per converted project and leaves existing ESLint configuration untouched.

For hybrid setups that still run ESLint for some checks, you can optionally use `eslint-plugin-oxlint` to reduce overlap while migrating.

## Experimental module boundaries bridge

`@nx/oxlint` exposes an experimental JS-plugin bridge at `@nx/oxlint/boundaries-plugin`.
It reuses Nx project-graph-aware `enforce-module-boundaries` logic from `@nx/eslint-plugin`.

Example config snippet:

```json
{
"jsPlugins": [
{
"name": "@nx",
"specifier": "@nx/oxlint/boundaries-plugin"
}
],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"depConstraints": []
}
]
}
}
```

This path is intended for early adopters and may change.
2 changes: 2 additions & 0 deletions astro-docs/src/plugins/utils/plugin-mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const pluginToTechnology: Record<string, string> = {
eslint: 'eslint',
'eslint-plugin': 'eslint',

oxlint: 'oxlint',

webpack: 'build-tools',
vite: 'build-tools',
rollup: 'build-tools',
Expand Down
Loading