Skip to content

Commit d4604f1

Browse files
CopilotcamchenryBoshen
authored
Update docs to include type-aware linting support (#462)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: camchenry <[email protected]> Co-authored-by: Boshen <[email protected]>
1 parent a39a6a9 commit d4604f1

File tree

2 files changed

+48
-21
lines changed

2 files changed

+48
-21
lines changed

src/docs/guide/usage/linter.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ Oxlint is designed to catch erroneous or useless code without requiring any conf
1515
:::info
1616
At this stage, Oxlint can be used to fully replace ESLint in small to medium projects.
1717

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

2223
## Features
2324

24-
- 50 - 100 times faster than ESLint, and scales with the number of CPU cores ([benchmark](https://github.com/oxc-project/bench-javascript-linter)).
25-
- 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).
25+
- 50 - 100 times faster than ESLint, and scales with the number of CPU cores
26+
([benchmark](https://github.com/oxc-project/bench-javascript-linter)).
27+
- Over 520 rules with a growing list from `eslint`, `typescript`, `eslint-plugin-react`,
28+
`eslint-plugin-jest`, `eslint-plugin-unicorn`, `eslint-plugin-jsx-a11y` and
29+
[many more](https://github.com/oxc-project/oxc/issues/481).
2630
- Supports
2731
- [type-aware rules](https://oxc.rs/blog/2025-08-17-oxlint-type-aware.html).
2832
- [`.oxlintrc.json` configuration file](./linter/config).
@@ -35,9 +39,28 @@ and run Oxlint before ESLint in your local or CI setup for a quicker feedback lo
3539
- Supports:
3640
- JavaScript and TypeScript by their extensions `js`, `mjs`, `cjs`, `jsx`, `ts`, `mts`, `cts` and `tsx`.
3741
- `<script>` content of `.vue`, `.astro` and `.svelte` files.
42+
- [type-aware rules](https://typescript-eslint.io/getting-started/typed-linting) defined by
43+
`typescript-eslint` (preview, requires `--type-aware` flag and `oxlint-tsgolint` package).
3844
- No support for:
3945
- [stylistic rules](https://eslint.style).
4046

47+
### Type-Aware Linting (Preview)
48+
49+
Oxlint supports type-aware rules in preview mode. To enable type-aware linting:
50+
51+
1. Install the required dependency:
52+
```bash
53+
pnpm add -D oxlint-tsgolint@latest
54+
```
55+
56+
2. Run oxlint with the `--type-aware` flag:
57+
```bash
58+
pnpm dlx oxlint --type-aware
59+
```
60+
61+
For more details and the list of supported type-aware rules, see the
62+
[type-aware linting announcement](/blog/2025-08-17-oxlint-type-aware).
63+
4164
## Installation
4265

4366
Run `oxlint` directly at the root of your repository:
@@ -88,7 +111,8 @@ $ bun add -D oxlint
88111

89112
:::
90113

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

93117
## Command-line Interface
94118

@@ -100,13 +124,16 @@ See [Configuration File](./linter/config)
100124

101125
## Migrate from eslint flat config
102126

103-
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).
127+
If you have an existing `eslint.config.*` file, you can convert it to an `.oxlintrc.json` config with
128+
[oxlint-migrate](https://github.com/oxc-project/oxlint-migrate).
104129

105130
## Integration
106131

107132
### ESLint
108133

109-
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.
134+
If you are looking for a way to use oxlint in projects that still need ESLint, you can use
135+
[eslint-plugin-oxlint](https://github.com/oxc-project/eslint-plugin-oxlint) to turn off ESLint rules
136+
that are already supported by oxlint. So you can enjoy the speed of oxlint while still using ESLint.
110137

111138
### lint-staged
112139

src/docs/guide/usage/linter/plugins.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,21 @@ You can also find this information on the [`linter product
8080
plan`](https://github.com/oxc-project/oxc/issues/481) issue on GitHub.
8181
:::
8282

83-
| Plugin Name | Default? | Issue | Notes |
84-
| ------------ | -------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
85-
| `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. |
86-
| `unicorn` || [#684](https://github.com/oxc-project/oxc/issues/684) | Rules ported from [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn) |
87-
| `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) |
88-
| `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) |
89-
| `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) |
90-
| `oxc` || N/A | Custom oxc-specific rules, as well as some rules ported from [deepscan](https://deepscan.io/) |
91-
| `import` | | [#1117](https://github.com/oxc-project/oxc/issues/1117) | Rules ported from [`eslint-plugin-import`](https://github.com/import-js/eslint-plugin-import) |
92-
| `jsdoc` | | [#1170](https://github.com/oxc-project/oxc/issues/1170) | Rules ported from [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc) |
93-
| `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) |
94-
| `node` | | [#493](https://github.com/oxc-project/oxc/issues/493) | Rules ported from [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n) |
95-
| `promise` | | [#4655](https://github.com/oxc-project/oxc/issues/4655) | Rules ported from [`eslint-plugin-promise`](https://github.com/eslint-community/eslint-plugin-promise) |
96-
| `jest` | | [#492](https://github.com/oxc-project/oxc/issues/492) | Rules ported from [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest) |
97-
| `vitest` | | [#4656](https://github.com/oxc-project/oxc/issues/4656) | Rules ported from [`eslint-plugin-vitest`](https://github.com/vitest-dev/eslint-plugin-vitest) |
83+
| Plugin Name | Default? | Issue | Notes |
84+
| ------------ | -------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
85+
| `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). |
86+
| `unicorn` || [#684](https://github.com/oxc-project/oxc/issues/684) | Rules from [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn) |
87+
| `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) |
88+
| `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) |
89+
| `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) |
90+
| `oxc` || N/A | Custom oxc-specific rules, as well as some rules ported from [deepscan](https://deepscan.io/) |
91+
| `import` | | [#1117](https://github.com/oxc-project/oxc/issues/1117) | Rules from [`eslint-plugin-import`](https://github.com/import-js/eslint-plugin-import) |
92+
| `jsdoc` | | [#1170](https://github.com/oxc-project/oxc/issues/1170) | Rules from [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc) |
93+
| `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) |
94+
| `node` | | [#493](https://github.com/oxc-project/oxc/issues/493) | Rules from [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n) |
95+
| `promise` | | [#4655](https://github.com/oxc-project/oxc/issues/4655) | Rules from [`eslint-plugin-promise`](https://github.com/eslint-community/eslint-plugin-promise) |
96+
| `jest` | | [#492](https://github.com/oxc-project/oxc/issues/492) | Rules from [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest) |
97+
| `vitest` | | [#4656](https://github.com/oxc-project/oxc/issues/4656) | Rules from [`eslint-plugin-vitest`](https://github.com/vitest-dev/eslint-plugin-vitest) |
9898

9999
## Adding New Plugins
100100

0 commit comments

Comments
 (0)