Skip to content

Migrate from ESLint to oxlint#1746

Merged
kmcginnes merged 1 commit intoaws:mainfrom
kmcginnes:migrate-eslint-to-oxlint
May 1, 2026
Merged

Migrate from ESLint to oxlint#1746
kmcginnes merged 1 commit intoaws:mainfrom
kmcginnes:migrate-eslint-to-oxlint

Conversation

@kmcginnes
Copy link
Copy Markdown
Collaborator

@kmcginnes kmcginnes commented May 1, 2026

Description

Migrates the project linting toolchain from ESLint to oxlint, with ESLint retained only for React Compiler rules.

  • Replace ESLint with oxlint as the primary linter (112 rules, ~2s vs ~21s)
  • Add type-aware linting via oxlint-tsgolint to restore all typescript-eslint/recommendedTypeChecked rules including switch-exhaustiveness-check
  • Move import sorting from perfectionist/sort-imports to oxfmt sortImports with matching group configuration
  • Retain ESLint only for the 14 React Compiler rules (react-hooks/refs, react-hooks/purity, etc.) that require compiler integration
  • Use eslint-plugin-oxlint to auto-disable ESLint rules already covered by oxlint
  • Add 31 bonus rules from oxc, unicorn, and typescript plugins that pass with zero violations
  • Pin linting dependencies to exact versions since oxlint JS plugins are alpha
  • Convert eslint-disable comments to oxlint-disable (or back to eslint-disable for React Compiler rules)

Benchmark

Metric Before (ESLint) After (oxlint + ESLint)
Wall clock ~21s ~8s
Rules ~106 112 native + 14 compiler

Note for contributors

After this change, VS Code users should install the oxc extension for in-editor lint feedback. ESLint extension will still work for the React Compiler rules.

Validation

  • pnpm checks passes (lint, format, types)
  • pnpm test passes (153 files, 1660 tests)
  • Import sorting matches upstream/main (only 16 files differ, all comment-only changes)
  • Reviewed by 3 independent AI reviewers (sonnet, opus, deepseek)

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

@kmcginnes kmcginnes force-pushed the migrate-eslint-to-oxlint branch from 852438c to c1286c5 Compare May 1, 2026 23:39
@kmcginnes kmcginnes marked this pull request as ready for review May 1, 2026 23:43
@kmcginnes kmcginnes force-pushed the migrate-eslint-to-oxlint branch from c1286c5 to 085014a Compare May 1, 2026 23:44
@kmcginnes kmcginnes merged commit 296f32e into aws:main May 1, 2026
3 checks passed
@kmcginnes kmcginnes deleted the migrate-eslint-to-oxlint branch May 1, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant