From 8016e03de6157b74e37a0441e77ee9fc4ec36566 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 14:36:44 -0700 Subject: [PATCH 01/20] docs: Update the plugins page to emphasize config file usage and improve wording. --- src/docs/guide/usage/linter/plugins.md | 90 ++++++++++++++------------ 1 file changed, 47 insertions(+), 43 deletions(-) diff --git a/src/docs/guide/usage/linter/plugins.md b/src/docs/guide/usage/linter/plugins.md index 70fa8fb842b..7ec77b61417 100644 --- a/src/docs/guide/usage/linter/plugins.md +++ b/src/docs/guide/usage/linter/plugins.md @@ -5,21 +5,35 @@ description: Enable built in plugin rule sets and extend Oxlint with ESLint comp # Built-in Plugins -Oxlint includes built in implementations of many popular ESLint plugin rule sets. Most rules in the `recommended` configs are already implemented, so you can get useful results without extra setup. +Oxlint includes built-in implementations of many popular ESLint plugin rule sets. Most rules in the `recommended` configs are already implemented, so you can get useful results without extra setup. -Oxlint also supports plugins written in JavaScript with an ESLint compatible API. See [JS Plugins](./js-plugins.md). +Oxlint also supports plugins written in JavaScript with an ESLint-compatible API. See [JS Plugins](./js-plugins.md). ## What a plugin means in Oxlint A plugin is a named group of rules. Enabling a plugin makes its rules available, and category flags control which rules are enabled and at what severity. -If you are migrating from ESLint, plugins map to the ecosystems you already know, such as import, react, jsx a11y, jest, unicorn, and more. +If you are migrating from ESLint, plugins map to the ecosystems you already know, such as import, react, jsx-a11y, jest, unicorn, and more. ## Enable a plugin +It is **strongly recommended** to use a config file to enable plugins, as it makes it considerably easier to manage and share with other developers on a project. + +### Enable in a config file + +You can also enable plugins in `.oxlintrc.json` using the `plugins` field: + +```json +{ + "plugins": ["import"] +} +``` + +Setting `plugins` overwrites the default plugin set. The list should include every plugin you want enabled. + ### Enable with the CLI -Enable a plugin using a `---plugin` flag. +You can also enable a plugin using a `---plugin` CLI flag. Example, enable the import plugin: @@ -39,19 +53,21 @@ Correctness rules are enabled by default. Tip: run `oxlint --help` to see the full list of plugin flags. -### Enable in a config file +## Disable default plugins -You can also enable plugins in `.oxlintrc.json` using the `plugins` field: +### Disable default plugins in a config file + +To disable all default plugins in a config file, set `plugins` to an empty array: ```json { - "plugins": ["import"] + "plugins": [] } ``` -Setting `plugins` overwrites the default plugin set. The list should include every plugin you want enabled. +This disables all default plugins and uses only the base rule set. -## Disable default plugins +### Disable default plugins with the CLI Several plugins are enabled by default. You can disable a default plugin with `--disable--plugin`. @@ -61,46 +77,34 @@ Example, disable unicorn: oxlint --disable-unicorn-plugin ``` -Only default plugins support being disabled. Non default plugins can simply be omitted. - -### Disable default plugins in a config file - -To disable all default plugins in a config file, set `plugins` to an empty array: - -```json -{ - "plugins": [] -} -``` - -This disables all default plugins and uses only the base rule set. +Only default plugins support being disabled. Non-default plugins can simply be omitted. ## Supported plugins -This table lists the built in plugins and where they come from. - -| Plugin name | Default | Source | -| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------ | -| `eslint` | Yes | ESLint core rules | -| `typescript` | Yes | TypeScript rules from the typescript eslint ecosystem. Type aware rules are available in alpha using the type aware mode | -| `unicorn` | Yes | eslint plugin unicorn | -| `react` | No | eslint plugin react and eslint plugin react hooks | -| `react-perf` | No | eslint plugin react perf | -| `nextjs` | No | eslint plugin next | -| `oxc` | Yes | Oxc specific rules and selected rules ported from deepscan | -| `import` | No | eslint plugin import | -| `jsdoc` | No | eslint plugin jsdoc | -| `jsx-a11y` | No | eslint plugin jsx a11y | -| `node` | No | eslint plugin n | -| `promise` | No | eslint plugin promise | -| `jest` | No | eslint plugin jest | -| `vitest` | No | eslint plugin vitest | -| `vue` | No | eslint plugin vue rules that work with script tags | +This table lists the built-in plugins and where they come from. + +| Plugin name | Default | Source | +| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------- | +| `eslint` | Yes | ESLint core rules | +| `typescript` | Yes | TypeScript rules from the @typescript-eslint ecosystem. Type aware rules are available in alpha using the type aware mode | +| `unicorn` | Yes | eslint-plugin-unicorn | +| `react` | No | eslint-plugin-react and eslint-plugin-react-hooks | +| `react-perf` | No | eslint-plugin-react-perf | +| `nextjs` | No | @next/eslint-plugin-next | +| `oxc` | Yes | Oxc-specific rules and selected rules ported from deepscan | +| `import` | No | eslint-plugin-import (also equivalent to eslint-plugin-import-x) | +| `jsdoc` | No | eslint-plugin-jsdoc | +| `jsx-a11y` | No | eslint-plugin-jsx-a11y | +| `node` | No | eslint-plugin-n | +| `promise` | No | eslint-plugin-promise | +| `jest` | No | eslint-plugin-jest | +| `vitest` | No | @vitest/eslint-plugin aka eslint-plugin-vitest | +| `vue` | No | eslint-plugin-vue rules that work with script tags | For the current status of rule coverage, see the linter [product plan issue](https://github.com/oxc-project/oxc/issues/481). ## Adding new plugins -Oxlint focuses on supporting the ecosystem through built in plugins and ESLint compatible JavaScript plugins. Contributions that add rules to existing built in plugins are encouraged. +Oxlint focuses on supporting the ecosystem through built-in plugins and ESLint-compatible JavaScript plugins. [Contributions that add rules](/docs/contribute/linter/adding-rules) to existing built-in plugins are encouraged. -If you think a rule set should be implemented as a built in plugin, open a discussion first. +If you think a rule set should be implemented as a built-in plugin, please open a GitHub discussion first. From 20a160b699164ad047071f9ea5497030ff8bc691 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 14:45:31 -0700 Subject: [PATCH 02/20] A few more minor improvements. --- src/docs/guide/usage/linter/plugins.md | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/docs/guide/usage/linter/plugins.md b/src/docs/guide/usage/linter/plugins.md index 7ec77b61417..23d30c0eca4 100644 --- a/src/docs/guide/usage/linter/plugins.md +++ b/src/docs/guide/usage/linter/plugins.md @@ -83,23 +83,23 @@ Only default plugins support being disabled. Non-default plugins can simply be o This table lists the built-in plugins and where they come from. -| Plugin name | Default | Source | -| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------- | -| `eslint` | Yes | ESLint core rules | -| `typescript` | Yes | TypeScript rules from the @typescript-eslint ecosystem. Type aware rules are available in alpha using the type aware mode | -| `unicorn` | Yes | eslint-plugin-unicorn | -| `react` | No | eslint-plugin-react and eslint-plugin-react-hooks | -| `react-perf` | No | eslint-plugin-react-perf | -| `nextjs` | No | @next/eslint-plugin-next | -| `oxc` | Yes | Oxc-specific rules and selected rules ported from deepscan | -| `import` | No | eslint-plugin-import (also equivalent to eslint-plugin-import-x) | -| `jsdoc` | No | eslint-plugin-jsdoc | -| `jsx-a11y` | No | eslint-plugin-jsx-a11y | -| `node` | No | eslint-plugin-n | -| `promise` | No | eslint-plugin-promise | -| `jest` | No | eslint-plugin-jest | -| `vitest` | No | @vitest/eslint-plugin aka eslint-plugin-vitest | -| `vue` | No | eslint-plugin-vue rules that work with script tags | +| Plugin name | Default | Source | +| ------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `eslint` | Yes | ESLint core rules | +| `typescript` | Yes | TypeScript rules from typescript-eslint (aka `@typescript-eslint/plugin`). Type-aware rules are available in alpha using [the type-aware mode](./type-aware.md). | +| `unicorn` | Yes | eslint-plugin-unicorn | +| `react` | No | eslint-plugin-react and eslint-plugin-react-hooks | +| `react-perf` | No | eslint-plugin-react-perf | +| `nextjs` | No | @next/eslint-plugin-next | +| `oxc` | Yes | Oxc-specific rules and selected rules ported from deepscan | +| `import` | No | eslint-plugin-import (also equivalent to eslint-plugin-import-x) | +| `jsdoc` | No | eslint-plugin-jsdoc | +| `jsx-a11y` | No | eslint-plugin-jsx-a11y | +| `node` | No | eslint-plugin-n | +| `promise` | No | eslint-plugin-promise | +| `jest` | No | eslint-plugin-jest | +| `vitest` | No | @vitest/eslint-plugin aka eslint-plugin-vitest | +| `vue` | No | eslint-plugin-vue rules that work with script tags | For the current status of rule coverage, see the linter [product plan issue](https://github.com/oxc-project/oxc/issues/481). From 18bc5f89cdff3b71e10305e2d5e1e66d0c52f3c3 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 14:52:06 -0700 Subject: [PATCH 03/20] Update quickstart to remove a reference to `--symlinks`, which has been removed from oxlint. --- src/docs/guide/usage/linter/quickstart.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/docs/guide/usage/linter/quickstart.md b/src/docs/guide/usage/linter/quickstart.md index cfdbfbd5263..1ed972fca5a 100644 --- a/src/docs/guide/usage/linter/quickstart.md +++ b/src/docs/guide/usage/linter/quickstart.md @@ -118,12 +118,6 @@ Disable ignore handling: oxlint --no-ignore ``` -Follow symlinks (Oxlint ignores symlinks by default): - -```sh -oxlint --symlinks -``` - See [Ignore files](/docs/guide/usage/linter/ignore-files). ### Fail CI reliably @@ -168,7 +162,7 @@ oxlint --print-config path/to/file.ts ### List available rules -List registered rules: +List registered rules, including those enabled by your current oxlint config: ```sh oxlint --rules From 2e5fcb2a7c8c47b8d5eac113813284703bcf3447 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 14:59:38 -0700 Subject: [PATCH 04/20] Rephrase nested config page a bit. --- src/docs/guide/usage/linter/nested-config.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/nested-config.md b/src/docs/guide/usage/linter/nested-config.md index fb3cd8564de..e4e0b714714 100644 --- a/src/docs/guide/usage/linter/nested-config.md +++ b/src/docs/guide/usage/linter/nested-config.md @@ -42,7 +42,9 @@ Configuration files are not automatically merged. A config in a child directory Command line options override configuration files, regardless of whether they come from a parent or child directory. -Passing `--config` disables nested config lookup and applies a single configuration file. +Passing an explicitly config file location using `-c` or `--config` disables nested config lookup, and Oxlint will only use that single configuration file. + +You can also disable nested configs with the `--disable-nested-configs` flag. ## Monorepo pattern: share a base config with extends From 9d98642b8f378e64e00ff1a1ef896eea2c01bd36 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:03:35 -0700 Subject: [PATCH 05/20] Update ci.md with more info and clarifications. Make it clear that some of these things are third-party integrations. --- src/docs/guide/usage/linter/ci.md | 38 +++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/src/docs/guide/usage/linter/ci.md b/src/docs/guide/usage/linter/ci.md index 284bfc0b9d0..6908dff98bb 100644 --- a/src/docs/guide/usage/linter/ci.md +++ b/src/docs/guide/usage/linter/ci.md @@ -1,11 +1,17 @@ --- -title: Setup CI -description: Run Oxlint in CI. +title: Setup CI and other integrations +description: Run Oxlint in CI or as a git hook. --- -# Setup CI +# Setup CI and other integrations -## GitHub Actions +You can - and should - setup your CI pipeline to run Oxlint and fail the build on lint errors. + +This page also covers other integrations you may want to include, like git pre-commit hooks. + +## CI + +### GitHub Actions Create `.github/workflows/oxlint.yml`: @@ -31,11 +37,27 @@ jobs: - uses: pnpm/action-setup@v4 - run: pnpm install --frozen-lockfile - - run: pnpm run lint --deny-warnings # given package.json scripts "lint": "oxlint" + - run: pnpm run lint # given package.json scripts "lint": "oxlint" +``` + +## Git hooks + +## lint-staged + +For JS/TS projects using [lint-staged](https://github.com/lint-staged/lint-staged), you can set up oxlint to run pre-commit as follows: + +```json +{ + "lint-staged": { + "*.{js,jsx,ts,tsx,mjs,cjs}": "pnpm run lint" + } +} ``` ### pre-commit +If you use [pre-commit](https://pre-commit.com/) to manage git hooks, you can set up Oxlint as follows: + ```yaml [.pre-commit-hooks.yaml] repos: - repo: https://github.com/oxc-project/mirrors-oxlint @@ -45,10 +67,12 @@ repos: verbose: true ``` +## Other integrations + ### Unplugin -https://www.npmjs.com/package/unplugin-oxlint +Unplugin is supported via a third-party package: https://www.npmjs.com/package/unplugin-oxlint ### Vite plugin -https://www.npmjs.com/package/vite-plugin-oxlint +A Vite plugin is supported via a third-party package: https://www.npmjs.com/package/vite-plugin-oxlint From 58628dd489c21a41c19636629ef168b0ce3c2ce7 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:14:22 -0700 Subject: [PATCH 06/20] Add a note about migrating from ESLint to quickstart. And remove the `-c` usage, as it's not necessary. --- src/docs/guide/usage/linter/quickstart.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/docs/guide/usage/linter/quickstart.md b/src/docs/guide/usage/linter/quickstart.md index 1ed972fca5a..bfe4aad6ed5 100644 --- a/src/docs/guide/usage/linter/quickstart.md +++ b/src/docs/guide/usage/linter/quickstart.md @@ -68,14 +68,18 @@ Initialize the `.oxlintrc.json` config with default values: oxlint --init ``` -Use a config file explicitly: +Then run Oxlint: ```sh -oxlint -c ./oxlintrc.json -# or -oxlint --config ./oxlintrc.json +oxlint ``` +::: tip +If you are migrating from ESLint, use [`@oxlint/migrate`](https://github.com/oxc-project/oxlint-migrate) to generate an Oxlint config from your existing ESLint flat file config. +::: + + + ### Fix problems Apply safe fixes: From 6fa824f3623ad86032bdda20573d7ebe4e34ed94 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:14:48 -0700 Subject: [PATCH 07/20] Reword parts of the config page. --- src/docs/guide/usage/linter/config.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/docs/guide/usage/linter/config.md b/src/docs/guide/usage/linter/config.md index df621dad28d..b002e4eb0c9 100644 --- a/src/docs/guide/usage/linter/config.md +++ b/src/docs/guide/usage/linter/config.md @@ -17,7 +17,7 @@ To generate a starter config in the current directory: oxlint --init ``` -Oxlint automatically looks for a `.oxlintrc.json` in the current working directory. You can also pass a config explicitly: +Oxlint automatically looks for a `.oxlintrc.json` in the current working directory. You can also pass a config explicitly (note that this will disable nested config lookup): ```sh oxlint -c ./oxlintrc.json @@ -27,8 +27,8 @@ oxlint --config ./oxlintrc.json Notes: -- Only `.json` config files are supported, and configuration files support comments (JSONC). -- The configuration format aims to be compatible with ESLint v8 (`eslintrc.json`). +- Only `.json` config files are supported, but oxlint configuration files support comments (like jsonc). +- The configuration format aims to be compatible with ESLint v8's format (`eslintrc.json`). A minimal configuration looks like this: @@ -102,7 +102,7 @@ To configure rule options, use an array: } ``` -All available rules are listed in the [Rules reference](/docs/guide/usage/linter/rules). +All available rules - and their configuration options - are listed in the [Rules reference](/docs/guide/usage/linter/rules). ### Override severity from the CLI @@ -176,18 +176,21 @@ For plugin details and CLI flags such as `--import-plugin`, see [Native Plugins] ## Configure JS plugins (experimental) -Oxlint also supports JavaScript plugins via `jsPlugins`. This is intended for compatibility and advanced integrations. +Oxlint also supports JavaScript plugins via `jsPlugins`. This is intended for compatibility with existing ESLint plugins and advanced integrations. Notes: - JS plugins are experimental and not subject to semver. - JS plugins are not supported in the language server at present. -JS plugins can be declared as strings or as objects with an alias: +JS plugins can be declared as strings, or as objects with an alias: ```jsonc { - "jsPlugins": [{ "name": "my-eslint-react", "specifier": "eslint-plugin-react" }], + "jsPlugins": [ + "eslint-plugin-playwright", + { "name": "my-eslint-react", "specifier": "eslint-plugin-react" }, + ], } ``` @@ -212,6 +215,7 @@ Example: ```jsonc { + "$schema": "./node_modules/oxlint/configuration_schema.json", "rules": { "no-console": "error", }, From 9b8fcc629ba669a04ba22d7478403a4aa7a23935 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:27:00 -0700 Subject: [PATCH 08/20] Add more info around type-aware linting, ensure it's clear that the flag is needed for CLI usage, and that the setting is needed for editor usage. --- src/docs/guide/usage/linter/editors.md | 14 ++++++++++- src/docs/guide/usage/linter/type-aware.md | 30 +++++++++++++---------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/docs/guide/usage/linter/editors.md b/src/docs/guide/usage/linter/editors.md index 0d919b6b37a..f045de5c1f3 100644 --- a/src/docs/guide/usage/linter/editors.md +++ b/src/docs/guide/usage/linter/editors.md @@ -39,7 +39,7 @@ Create `.vscode/extensions.json`: } ``` -2. Enable fix on save (optional). +2. Enable fix-on-save (optional). Add to `.vscode/settings.json`: @@ -51,6 +51,18 @@ Add to `.vscode/settings.json`: } ``` +3. Enable type-aware linting (optional). + +If you'd like to use type-aware rules and show type-related lint violations, ensure that `typeAware` is set to `true` as well: + +```jsonc +{ + "oxc.typeAware": true, +} +``` + +You also need to ensure `oxlint-tsgolint` is installed in your project. See [the type-aware linting docs](/docs/guide/usage/linter/type-aware) for more details. + ### Usage and configuration reference - [https://github.com/oxc-project/oxc/tree/main/editors/vscode](https://github.com/oxc-project/oxc/tree/main/editors/vscode) diff --git a/src/docs/guide/usage/linter/type-aware.md b/src/docs/guide/usage/linter/type-aware.md index abba342bf7d..18d81048c30 100644 --- a/src/docs/guide/usage/linter/type-aware.md +++ b/src/docs/guide/usage/linter/type-aware.md @@ -45,7 +45,7 @@ bun add -D oxlint-tsgolint@latest ## Running type-aware linting -Enable type-aware linting with the `--type-aware` flag: +To run Oxlint with type-aware linting, you must pass the `--type-aware` flag: ```bash oxlint --type-aware @@ -55,6 +55,8 @@ When enabled, Oxlint runs standard rules and type-aware rules in the `typescript Type-aware linting is opt-in and does not run unless the flag is provided. +In editor and LSP-based integrations like VS Code, type-aware linting can be enabled by setting the `typeAware` option to `true`, see the [Editors](./editors) page for more information. + ### Monorepos and build outputs Type-aware linting requires resolved type information. @@ -145,7 +147,9 @@ Type-aware linting is **alpha**: - Very large codebases may encounter high memory usage - Performance continues to improve -## Performance and debugging +## Troubleshooting + +### Performance and debugging If type-aware linting is slow or uses excessive memory: @@ -163,20 +167,20 @@ OXC_LOG=debug oxlint --type-aware Example output (showing key timing milestones): ``` -2025/01/01 12:00:00.000000 Starting tsgolint -2025/01/01 12:00:00.001000 Starting to assign files to programs. Total files: 259 -2025/01/01 12:00:01.000000 Done assigning files to programs. Total programs: 8. Unmatched files: 75 -2025/01/01 12:00:01.001000 Starting linter with 12 workers -2025/01/01 12:00:01.001000 Workload distribution: 8 programs -2025/01/01 12:00:01.002000 [1/8] Running linter on program: /path/to/project/jsconfig.json +2026/01/01 12:00:00.000000 Starting tsgolint +2026/01/01 12:00:00.001000 Starting to assign files to programs. Total files: 259 +2026/01/01 12:00:01.000000 Done assigning files to programs. Total programs: 8. Unmatched files: 75 +2026/01/01 12:00:01.001000 Starting linter with 12 workers +2026/01/01 12:00:01.001000 Workload distribution: 8 programs +2026/01/01 12:00:01.002000 [1/8] Running linter on program: /path/to/project/jsconfig.json ... -2025/01/01 12:00:01.100000 [4/8] Running linter on program: /path/to/project/tsconfig.json -2025/01/01 12:00:02.500000 Program created with 26140 source files -2025/01/01 12:00:14.000000 /path/to/project/oxlint-plugin.mts +2026/01/01 12:00:01.100000 [4/8] Running linter on program: /path/to/project/tsconfig.json +2026/01/01 12:00:02.500000 Program created with 26140 source files +2026/01/01 12:00:14.000000 /path/to/project/oxlint-plugin.mts ... -2025/01/01 12:00:14.100000 [5/8] Running linter on program: /path/to/project/apps/tsconfig.json +2026/01/01 12:00:14.100000 [5/8] Running linter on program: /path/to/project/apps/tsconfig.json ... -2025/01/01 12:00:15.000000 Linting Complete +2026/01/01 12:00:15.000000 Linting Complete Finished in 16.4s on 259 files with 161 rules using 12 threads. ``` From 39098e9c22d6d2b63859f5c79b0222815f1fac2a Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:28:52 -0700 Subject: [PATCH 09/20] Phrasing. --- src/docs/guide/usage/linter/editors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/editors.md b/src/docs/guide/usage/linter/editors.md index f045de5c1f3..248f5dfe47b 100644 --- a/src/docs/guide/usage/linter/editors.md +++ b/src/docs/guide/usage/linter/editors.md @@ -53,7 +53,7 @@ Add to `.vscode/settings.json`: 3. Enable type-aware linting (optional). -If you'd like to use type-aware rules and show type-related lint violations, ensure that `typeAware` is set to `true` as well: +If you'd like to use type-aware rules and show type-related lint violations, ensure that `typeAware` is set to `true` in your VS Code settings (`.vscode/settings.json`): ```jsonc { From 7d57596597ab2366855e874ada989fe5b6cb8532 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:32:28 -0700 Subject: [PATCH 10/20] Add gitlab and junit formats to the quickstart list. --- src/docs/guide/usage/linter/quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/quickstart.md b/src/docs/guide/usage/linter/quickstart.md index bfe4aad6ed5..448b03ac9f9 100644 --- a/src/docs/guide/usage/linter/quickstart.md +++ b/src/docs/guide/usage/linter/quickstart.md @@ -154,7 +154,7 @@ Select an output format: oxlint -f json ``` -Available formats include: `default`, `json`, `unix`, `checkstyle`, `github`, `stylish`. +Available formats include: `default`, `json`, `unix`, `checkstyle`, `github`, `gitlab`, `junit`, `stylish`. ### Inspect the effective configuration From 4c2d10b47a72ba34176465f2caf18390b3ef21c0 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:44:16 -0700 Subject: [PATCH 11/20] Remove more hallucinations. oxlint-enable-next-line and oxlint-enable-line are not real. --- .../guide/usage/linter/ignore-comments.md | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/docs/guide/usage/linter/ignore-comments.md b/src/docs/guide/usage/linter/ignore-comments.md index 7aa34c0b457..6b9125f08eb 100644 --- a/src/docs/guide/usage/linter/ignore-comments.md +++ b/src/docs/guide/usage/linter/ignore-comments.md @@ -11,17 +11,17 @@ Oxlint supports line comments (`//`) and block comments (`/* */`). Comments must ## oxlint-disable -Disable one or more rules until the end of the file, or until they are re enabled. +Disable one or more rules until the end of the file, or until they are re-enabled. ```js -// Disable Oxlint for the rest of the file +// Disable all Oxlint rules for the rest of the file /* oxlint-disable */ // Disable a single rule in this file /* oxlint-disable no-console */ // Disable multiple rules in this file -/* oxlint-disable no-console, no-alert */ +/* oxlint-disable no-console, typescript/no-floating-promises */ ``` ## oxlint-enable @@ -44,17 +44,9 @@ console.log("Hello, world!"); // oxlint-disable-line no-console console.log(x++); // oxlint-disable-line no-console, no-plusplus ``` -## oxlint-enable-line - -Enable one or more rules on the current line. - -```js -// oxlint-enable-line no-console -``` - ## oxlint-disable-next-line -Disable one or more rules on the line following the comment, then re enable them automatically. +Disable one or more rules on the line following the comment, then re-enables them for subsequent lines. ```js // oxlint-disable-next-line no-console @@ -65,14 +57,6 @@ console.log(x++); // not allowed because the previous comment only applied to th console.log("Hello, world!"); // allowed ``` -## oxlint-enable-next-line - -Enable one or more rules on the line following the comment, then re enable automatically. - -```js -// oxlint-enable-next-line no-console -``` - ## ESLint compatibility For compatibility with existing ESLint codebases, the same keywords are supported with `oxlint` replaced by `eslint`, such as `/* eslint-disable */` and `// eslint-disable-next-line`. From ca3f7afe65ff36836fbe23d0148f41f072348bad Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:50:55 -0700 Subject: [PATCH 12/20] Fix header depth. --- src/docs/guide/usage/linter/ci.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/ci.md b/src/docs/guide/usage/linter/ci.md index 6908dff98bb..4b642be71fb 100644 --- a/src/docs/guide/usage/linter/ci.md +++ b/src/docs/guide/usage/linter/ci.md @@ -42,7 +42,7 @@ jobs: ## Git hooks -## lint-staged +### lint-staged For JS/TS projects using [lint-staged](https://github.com/lint-staged/lint-staged), you can set up oxlint to run pre-commit as follows: From 0760801a92971ebd363147cdde48d39e89f0f74f Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:51:38 -0700 Subject: [PATCH 13/20] Fix grammar. --- src/docs/guide/usage/linter/nested-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/nested-config.md b/src/docs/guide/usage/linter/nested-config.md index e4e0b714714..eef59ffb23a 100644 --- a/src/docs/guide/usage/linter/nested-config.md +++ b/src/docs/guide/usage/linter/nested-config.md @@ -42,7 +42,7 @@ Configuration files are not automatically merged. A config in a child directory Command line options override configuration files, regardless of whether they come from a parent or child directory. -Passing an explicitly config file location using `-c` or `--config` disables nested config lookup, and Oxlint will only use that single configuration file. +Passing an explicit config file location using `-c` or `--config` disables nested config lookup, and Oxlint will only use that single configuration file. You can also disable nested configs with the `--disable-nested-configs` flag. From 3bbfccbc55a49b1cc624991c7e224587394deed4 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 4 Jan 2026 15:57:50 -0700 Subject: [PATCH 14/20] Update type-aware page to add back some compatibility notes. "Invalid options are reported when `--type-check` is enabled" I'm actually not sure if this is true, we should maybe remove it. --- src/docs/guide/usage/linter/type-aware.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/type-aware.md b/src/docs/guide/usage/linter/type-aware.md index 18d81048c30..7706b154f4b 100644 --- a/src/docs/guide/usage/linter/type-aware.md +++ b/src/docs/guide/usage/linter/type-aware.md @@ -136,9 +136,12 @@ oxlint --type-aware --report-unused-disable-directives Type-aware linting is powered by `typescript-go`. - TypeScript **7.0+** is required -- Some legacy `tsconfig` options are not supported +- Some legacy `tsconfig` options are not supported (like `baseUrl` in `tsconfig.json`) +- If you're using config options/features that were deprecated in TypeScript 6.0 or removed in TypeScript 7.0, you'll need to migrate your codebase first - Invalid options are reported when `--type-check` is enabled +See the [TypeScript migration guide](https://github.com/microsoft/TypeScript/issues/62508#issuecomment-3348649259) for more details, and consider using [ts5to6](https://github.com/andrewbranch/ts5to6) to upgrade your tsconfig file. + ## Stability notes Type-aware linting is **alpha**: From f3e0d03ab8915640f64b7cacca1e302c0b2ef173 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 5 Jan 2026 07:26:46 -0700 Subject: [PATCH 15/20] Update src/docs/guide/usage/linter/ci.md Signed-off-by: Connor Shea --- src/docs/guide/usage/linter/ci.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/ci.md b/src/docs/guide/usage/linter/ci.md index 4b642be71fb..04494381bf4 100644 --- a/src/docs/guide/usage/linter/ci.md +++ b/src/docs/guide/usage/linter/ci.md @@ -37,7 +37,7 @@ jobs: - uses: pnpm/action-setup@v4 - run: pnpm install --frozen-lockfile - - run: pnpm run lint # given package.json scripts "lint": "oxlint" + - run: pnpm run lint --deny-warnings # given package.json scripts "lint": "oxlint" ``` ## Git hooks From 1969bba9d2d4c42e0a0347ab8ac99fbe1df5d52d Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 5 Jan 2026 07:30:39 -0700 Subject: [PATCH 16/20] Update src/docs/guide/usage/linter/config.md Signed-off-by: Connor Shea --- src/docs/guide/usage/linter/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/config.md b/src/docs/guide/usage/linter/config.md index b002e4eb0c9..ad90de2817f 100644 --- a/src/docs/guide/usage/linter/config.md +++ b/src/docs/guide/usage/linter/config.md @@ -102,7 +102,7 @@ To configure rule options, use an array: } ``` -All available rules - and their configuration options - are listed in the [Rules reference](/docs/guide/usage/linter/rules). +All available rules, and their configuration options, are listed in the [Rules reference](/docs/guide/usage/linter/rules). ### Override severity from the CLI From dc5d21ef2826ad7cd79ae60af59aa5a572ae84ae Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 5 Jan 2026 07:35:47 -0700 Subject: [PATCH 17/20] Update src/docs/guide/usage/linter/ci.md Co-authored-by: Alexander Lichter Signed-off-by: Connor Shea --- src/docs/guide/usage/linter/ci.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/ci.md b/src/docs/guide/usage/linter/ci.md index 04494381bf4..b03bac8cb53 100644 --- a/src/docs/guide/usage/linter/ci.md +++ b/src/docs/guide/usage/linter/ci.md @@ -75,4 +75,4 @@ Unplugin is supported via a third-party package: https://www.npmjs.com/package/u ### Vite plugin -A Vite plugin is supported via a third-party package: https://www.npmjs.com/package/vite-plugin-oxlint +A Vite plugin is supported via a [third-party package](https://www.npmjs.com/package/vite-plugin-oxlint) From 1648ee75b677e1f1096b6ef73b8a3cdc13d5eb22 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 5 Jan 2026 07:35:54 -0700 Subject: [PATCH 18/20] Update src/docs/guide/usage/linter/ci.md Co-authored-by: Alexander Lichter Signed-off-by: Connor Shea --- src/docs/guide/usage/linter/ci.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/ci.md b/src/docs/guide/usage/linter/ci.md index b03bac8cb53..f74f4a781bf 100644 --- a/src/docs/guide/usage/linter/ci.md +++ b/src/docs/guide/usage/linter/ci.md @@ -71,7 +71,7 @@ repos: ### Unplugin -Unplugin is supported via a third-party package: https://www.npmjs.com/package/unplugin-oxlint +Unplugin is supported via a [third-party package](https://www.npmjs.com/package/unplugin-oxlint) ### Vite plugin From b924b816b011b5d2b23ae6189fe790fb7f1221b0 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 5 Jan 2026 07:38:28 -0700 Subject: [PATCH 19/20] Update src/docs/guide/usage/linter/plugins.md Co-authored-by: Alexander Lichter Signed-off-by: Connor Shea --- src/docs/guide/usage/linter/plugins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/plugins.md b/src/docs/guide/usage/linter/plugins.md index 23d30c0eca4..20ca844a7e5 100644 --- a/src/docs/guide/usage/linter/plugins.md +++ b/src/docs/guide/usage/linter/plugins.md @@ -29,7 +29,7 @@ You can also enable plugins in `.oxlintrc.json` using the `plugins` field: } ``` -Setting `plugins` overwrites the default plugin set. The list should include every plugin you want enabled. +Setting `plugins` **overwrites the default plugin set**. The list should include every plugin you want enabled. ### Enable with the CLI From 8c4f5a7697bc152f99ba814461e58bd6f0c45557 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 5 Jan 2026 07:38:41 -0700 Subject: [PATCH 20/20] Update src/docs/guide/usage/linter/plugins.md Co-authored-by: Alexander Lichter Signed-off-by: Connor Shea --- src/docs/guide/usage/linter/plugins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guide/usage/linter/plugins.md b/src/docs/guide/usage/linter/plugins.md index 20ca844a7e5..65decc2cfc6 100644 --- a/src/docs/guide/usage/linter/plugins.md +++ b/src/docs/guide/usage/linter/plugins.md @@ -107,4 +107,4 @@ For the current status of rule coverage, see the linter [product plan issue](htt Oxlint focuses on supporting the ecosystem through built-in plugins and ESLint-compatible JavaScript plugins. [Contributions that add rules](/docs/contribute/linter/adding-rules) to existing built-in plugins are encouraged. -If you think a rule set should be implemented as a built-in plugin, please open a GitHub discussion first. +If you think a rule set should be implemented as a built-in plugin, please [open a GitHub discussion](https://github.com/oxc-project/oxc/discussions/new?category=feature-request) first.