Skip to content

Commit cef3dd0

Browse files
chore: improve oxlint example (#83898)
Follow-up of #83842 This PR adds the `eslint` plugin which enforces eslint-core rules, as well as defines `ignorePatterns` that should work well with Next.js by default --------- Co-authored-by: Joseph <[email protected]>
1 parent eb602d4 commit cef3dd0

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2-
"$schema": "./node_modules/oxlint/configuration_schema.json",
3-
"plugins": ["react", "unicorn", "oxc", "typescript", "nextjs"]
2+
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/refs/tags/oxlint_v1.16.0/npm/oxlint/configuration_schema.json",
3+
"plugins": ["eslint", "react", "unicorn", "oxc", "typescript", "nextjs"],
4+
"ignorePatterns": ["node_modules/**", ".next/**", "dist/**", "build/**"]
45
}

examples/with-oxlint/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ This example shows how to configure [Oxlint](https://oxc.rs/docs/guide/usage/lin
44

55
Linting via Oxlint in this example includes type-aware linting through the `oxlint-tsgolint` integration, which is [in technical preview](https://oxc.rs/blog/2025-08-17-oxlint-type-aware.html) at the time of writing.
66

7-
In [`.oxlintrc.json`](./.oxlintrc.json), the plugins `react`, `unicorn`, `typescript`, `nextjs`, and `oxc` are enabled.
7+
In [`.oxlintrc.json`](./.oxlintrc.json), the plugins `eslint`, `react`, `unicorn`, `typescript`, `nextjs`, and `oxc` are enabled.
88

9-
The first four are [Rust-based Oxlint plugins](https://oxc.rs/docs/guide/usage/linter/plugins.html#supported-plugins) that port rules from the corresponding ESLint plugins.
9+
The first five are [Rust-based Oxlint plugins](https://oxc.rs/docs/guide/usage/linter/plugins.html#supported-plugins) that port rules from the ESLint core and the corresponding ESLint plugins.
1010

1111
The `oxc` plugin provides Oxc-specific rules along with some rules ported from Deepscan.
1212

13+
Further, Oxlint will not lint your `.next`, `dist`, `build` and `node_modules` directories based on the configured `ignorePatterns`.
14+
1315
## Deploy your own
1416

1517
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-oxlint&project-name=with-oxlint&repository-name=with-oxlint)

0 commit comments

Comments
 (0)