Repository navigation
chore: Replace ESLint with oxlint - #618
torokati44 wants to merge 1 commit into
Conversation
eslint-config-next pulls in eslint-plugin-react, -import and -jsx-a11y, which are unmaintained and don't support ESLint 10, causing peer dependency warnings. ESLint 10 and typescript-eslint also depend on a vulnerable minimatch (GHSA-g3hv-75wg-m249). oxlint has built-in ports of the rules we used (eslint:recommended, typescript-eslint recommended, @next/next core-web-vitals) plus react-hooks, including the React Compiler rules. The config enables the default correctness category and the remaining rules from the old setup.
|
Looks like this already caught a lint: I have a commit ready that fixes this (of course also written by AI). |
|
I don't feel totally comfortable reviewing this myself as I'm completely unfamiliar with oxlint, but did the AI mention if it used https://oxc.rs/docs/guide/usage/linter/migrate-from-eslint.html? |
| "build": "next build", | ||
| "start": "next start", | ||
| "lint": "eslint .", | ||
| "lint": "oxlint", |
There was a problem hiding this comment.
Do we want oxlint --deny-warnings instead?
|
@danielhjacobs It said: No, I didn't use it the first time. Having now read it and run its converter ( What the converter confirms
Where the branch's config is stricter than the converter's
Useful new points
The rest doesn't apply here: running alongside ESLint, JS plugins for unsupported plugins, and converting old-style ESLint configs. |
Motivation: jsx-eslint/eslint-plugin-react#3977 not progressing.
This should unblock switching to TypeScript 7 (#607)
I will admit this whole thing was done by AI, including the rest of this message.
eslint-config-next pulls in eslint-plugin-react, -import and -jsx-a11y, which are unmaintained and don't support ESLint 10, causing peer dependency warnings. ESLint 10 and typescript-eslint also depend on a vulnerable minimatch (GHSA-g3hv-75wg-m249).
oxlint has built-in ports of the rules we used (eslint:recommended, typescript-eslint recommended, @next/next core-web-vitals) plus react-hooks, including the React Compiler rules. The config enables the default correctness category and the remaining rules from the old setup.