Unverified Commit cef3dd05 authored by Alexander Lichter's avatar Alexander Lichter Committed by GitHub

chore: improve oxlint example (#83898)

Follow-up of https://github.com/vercel/next.js/pull/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: 's avatarJoseph <joseph.chamochumbi@vercel.com>
parent eb602d4b
{ {
"$schema": "./node_modules/oxlint/configuration_schema.json", "$schema": "https://raw.githubusercontent.com/oxc-project/oxc/refs/tags/oxlint_v1.16.0/npm/oxlint/configuration_schema.json",
"plugins": ["react", "unicorn", "oxc", "typescript", "nextjs"] "plugins": ["eslint", "react", "unicorn", "oxc", "typescript", "nextjs"],
"ignorePatterns": ["node_modules/**", ".next/**", "dist/**", "build/**"]
} }
...@@ -4,12 +4,14 @@ This example shows how to configure [Oxlint](https://oxc.rs/docs/guide/usage/lin ...@@ -4,12 +4,14 @@ This example shows how to configure [Oxlint](https://oxc.rs/docs/guide/usage/lin
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. 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.
In [`.oxlintrc.json`](./.oxlintrc.json), the plugins `react`, `unicorn`, `typescript`, `nextjs`, and `oxc` are enabled. In [`.oxlintrc.json`](./.oxlintrc.json), the plugins `eslint`, `react`, `unicorn`, `typescript`, `nextjs`, and `oxc` are enabled.
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. 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.
The `oxc` plugin provides Oxc-specific rules along with some rules ported from Deepscan. The `oxc` plugin provides Oxc-specific rules along with some rules ported from Deepscan.
Further, Oxlint will not lint your `.next`, `dist`, `build` and `node_modules` directories based on the configured `ignorePatterns`.
## Deploy your own ## Deploy your own
[![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) [![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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment