Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 33 additions & 7 deletions src/docs/guide/usage/linter.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ Oxlint is designed to catch erroneous or useless code without requiring any conf
:::info
At this stage, Oxlint can be used to fully replace ESLint in small to medium projects.

For larger projects, our advice is to turn off ESLint rules via [eslint-plugin-oxlint](https://www.npmjs.com/package/eslint-plugin-oxlint),
For larger projects, our advice is to turn off ESLint rules via
[eslint-plugin-oxlint](https://www.npmjs.com/package/eslint-plugin-oxlint),
and run Oxlint before ESLint in your local or CI setup for a quicker feedback loop.
:::

## Features

- 50 - 100 times faster than ESLint, and scales with the number of CPU cores ([benchmark](https://github.com/oxc-project/bench-javascript-linter)).
- Over 520 rules with a growing list from `eslint`, `typescript`, `eslint-plugin-react`, `eslint-plugin-jest`, `eslint-plugin-unicorn`, `eslint-plugin-jsx-a11y` and [many more](https://github.com/oxc-project/oxc/issues/481).
- 50 - 100 times faster than ESLint, and scales with the number of CPU cores
([benchmark](https://github.com/oxc-project/bench-javascript-linter)).
- Over 520 rules with a growing list from `eslint`, `typescript`, `eslint-plugin-react`,
`eslint-plugin-jest`, `eslint-plugin-unicorn`, `eslint-plugin-jsx-a11y` and
[many more](https://github.com/oxc-project/oxc/issues/481).
- Supports
- [`.oxlintrc.json` configuration file](./linter/config).
- [Nested configuration file](./linter/nested-config)
Expand All @@ -34,10 +38,28 @@ and run Oxlint before ESLint in your local or CI setup for a quicker feedback lo
- Supports:
- JavaScript and TypeScript by their extensions `js`, `mjs`, `cjs`, `jsx`, `ts`, `mts`, `cts` and `tsx`.
- `<script>` content of `.vue`, `.astro` and `.svelte` files.
- [type-aware rules](https://typescript-eslint.io/getting-started/typed-linting) defined by
`typescript-eslint` (preview, requires `--type-aware` flag and `oxlint-tsgolint` package).
- No support for:
- [type-aware rules](https://typescript-eslint.io/getting-started/typed-linting) defined by `typescript-eslint`.
- [stylistic rules](https://eslint.style).

### Type-Aware Linting (Preview)

Oxlint supports type-aware rules in preview mode. To enable type-aware linting:

1. Install the required dependency:
```bash
pnpm add -D oxlint-tsgolint@latest
```

2. Run oxlint with the `--type-aware` flag:
```bash
pnpm dlx oxlint --type-aware
```

For more details and the list of supported type-aware rules, see the
[type-aware linting announcement](/blog/2025-08-17-oxlint-type-aware).

## Installation

Run `oxlint` directly at the root of your repository:
Expand Down Expand Up @@ -88,7 +110,8 @@ $ bun add -D oxlint

:::

`oxlint` does not require Node.js, the binaries can be downloaded from the [latest GitHub releases](https://github.com/oxc-project/oxc/releases/latest).
`oxlint` does not require Node.js, the binaries can be downloaded from the
[latest GitHub releases](https://github.com/oxc-project/oxc/releases/latest).

## Command-line Interface

Expand All @@ -100,13 +123,16 @@ See [Configuration File](./linter/config)

## Migrate from eslint flat config

If you have an existing `eslint.config.*` file, you can convert it to an `.oxlintrc.json` config with [oxlint-migrate](https://github.com/oxc-project/oxlint-migrate).
If you have an existing `eslint.config.*` file, you can convert it to an `.oxlintrc.json` config with
[oxlint-migrate](https://github.com/oxc-project/oxlint-migrate).

## Integration

### ESLint

If you are looking for a way to use oxlint in projects that still need ESLint, you can use [eslint-plugin-oxlint](https://github.com/oxc-project/eslint-plugin-oxlint) to turn off ESLint rules that are already supported by oxlint. So you can enjoy the speed of oxlint while still using ESLint.
If you are looking for a way to use oxlint in projects that still need ESLint, you can use
[eslint-plugin-oxlint](https://github.com/oxc-project/eslint-plugin-oxlint) to turn off ESLint rules
that are already supported by oxlint. So you can enjoy the speed of oxlint while still using ESLint.

### lint-staged

Expand Down
24 changes: 12 additions & 12 deletions src/docs/guide/usage/linter/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ plan`](https://github.com/oxc-project/oxc/issues/481) issue on GitHub.

| Plugin Name | Default? | Issue | Notes |
| ------------ | -------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `typescript` | ✅ | [#2180](https://github.com/oxc-project/oxc/issues/2180) | TypeScript-specific rules from [`@typescript-eslint`](https://typescript-eslint.io/rules/). We do not currently support rules that require type information. |
| `unicorn` | ✅ | [#684](https://github.com/oxc-project/oxc/issues/684) | Rules ported from [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn) |
| `react` | | [#1022](https://github.com/oxc-project/oxc/issues/1022), [#2174](https://github.com/oxc-project/oxc/issues/2174) | Rules ported from [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react) and [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) |
| `react-perf` | | [#2041](https://github.com/oxc-project/oxc/issues/2041) | Rules ported from [`eslint-plugin-react-perf`](https://github.com/cvazac/eslint-plugin-react-perf) |
| `nextjs` | | [#1929](https://github.com/oxc-project/oxc/issues/1929) | Rules ported from [`eslint-plugin-next`](https://nextjs.org/docs/pages/building-your-application/configuring/eslint#eslint-plugin) |
| `typescript` | ✅ | [#2180](https://github.com/oxc-project/oxc/issues/2180) | TypeScript-specific rules from [`@typescript-eslint`](https://typescript-eslint.io/rules/). Type-aware rules are supported in preview (use `--type-aware` flag). |
| `unicorn` | ✅ | [#684](https://github.com/oxc-project/oxc/issues/684) | Rules from [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn) |
| `react` | | [#1022](https://github.com/oxc-project/oxc/issues/1022), [#2174](https://github.com/oxc-project/oxc/issues/2174) | Rules from [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react) and [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) |
| `react-perf` | | [#2041](https://github.com/oxc-project/oxc/issues/2041) | Rules from [`eslint-plugin-react-perf`](https://github.com/cvazac/eslint-plugin-react-perf) |
| `nextjs` | | [#1929](https://github.com/oxc-project/oxc/issues/1929) | Rules from [`eslint-plugin-next`](https://nextjs.org/docs/pages/building-your-application/configuring/eslint#eslint-plugin) |
| `oxc` | ✅ | N/A | Custom oxc-specific rules, as well as some rules ported from [deepscan](https://deepscan.io/) |
| `import` | | [#1117](https://github.com/oxc-project/oxc/issues/1117) | Rules ported from [`eslint-plugin-import`](https://github.com/import-js/eslint-plugin-import) |
| `jsdoc` | | [#1170](https://github.com/oxc-project/oxc/issues/1170) | Rules ported from [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc) |
| `jsx-a11y` | | [#1141](https://github.com/oxc-project/oxc/issues/1141) | Rules ported from [`eslint-plugin-jsx-a11y`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) |
| `node` | | [#493](https://github.com/oxc-project/oxc/issues/493) | Rules ported from [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n) |
| `promise` | | [#4655](https://github.com/oxc-project/oxc/issues/4655) | Rules ported from [`eslint-plugin-promise`](https://github.com/eslint-community/eslint-plugin-promise) |
| `jest` | | [#492](https://github.com/oxc-project/oxc/issues/492) | Rules ported from [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest) |
| `vitest` | | [#4656](https://github.com/oxc-project/oxc/issues/4656) | Rules ported from [`eslint-plugin-vitest`](https://github.com/vitest-dev/eslint-plugin-vitest) |
| `import` | | [#1117](https://github.com/oxc-project/oxc/issues/1117) | Rules from [`eslint-plugin-import`](https://github.com/import-js/eslint-plugin-import) |
| `jsdoc` | | [#1170](https://github.com/oxc-project/oxc/issues/1170) | Rules from [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc) |
| `jsx-a11y` | | [#1141](https://github.com/oxc-project/oxc/issues/1141) | Rules from [`eslint-plugin-jsx-a11y`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) |
| `node` | | [#493](https://github.com/oxc-project/oxc/issues/493) | Rules from [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n) |
| `promise` | | [#4655](https://github.com/oxc-project/oxc/issues/4655) | Rules from [`eslint-plugin-promise`](https://github.com/eslint-community/eslint-plugin-promise) |
| `jest` | | [#492](https://github.com/oxc-project/oxc/issues/492) | Rules from [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest) |
| `vitest` | | [#4656](https://github.com/oxc-project/oxc/issues/4656) | Rules from [`eslint-plugin-vitest`](https://github.com/vitest-dev/eslint-plugin-vitest) |

## Adding New Plugins

Expand Down