Skip to content

build: replace eslint and prettier with oxlint and oxfmt - #277

Merged
will-molloy merged 4 commits into
mainfrom
oxlint
Nov 27, 2026
Merged

will-molloy merged 4 commits into
mainfrom
oxlint

Conversation

@will-molloy

@will-molloy will-molloy commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

🤖 Drafted by Claude Code.

Closes #276.

Lint and format with oxlint and Oxfmt instead of ESLint and Prettier.
Linting and the format check run about 9x faster locally, dropping from about 3.2s to 0.37s.

ESLint's plugins have often held back dependency upgrades, because each one lags new ESLint and TypeScript majors.
Currently eslint-plugin-react, eslint-plugin-import and eslint-plugin-jsx-a11y only support ESLint up to 9, which keeps ESLint 10 from landing in #272.
oxlint builds those rule sets in, so upgrades should depend on one tool instead of a dozen plugins.

Proposed changes

  • Lint with oxlint's built-in correctness, suspicious and perf categories, with only a few rule overrides
    • Enable type-aware rules via oxlint-tsgolint
    • Keep no-console, import/first, import/no-duplicates, import/no-namespace and react/only-export-components from the old config
  • Format with Oxfmt, using the old Prettier options
    • Sort imports, replacing import/order
    • Sort package.json keys, replacing sort-package-json in verify:all
    • Scope it to js/ts/tsx/css and package.json, so workflows, Markdown and CHANGELOG.md keep their current formatting
    • Check it with pnpm format --check as its own verify:all step, separate from lint
  • Group TypeScript majors with the js dependencies, since oxlint-tsgolint ships its own TypeScript
  • Remove 17 ESLint, Prettier and plugin dependencies, including stylelint-prettier
  • Import defineConfig from vitest/config instead of using the triple-slash vitest reference

Notes

  • Checks no longer covered:
    • the stylistic and strict rules from typescript-eslint strictTypeChecked and stylisticTypeChecked
    • autofix for unused imports (no-unused-vars still flags them)
  • Oxfmt orders a few package.json keys differently from sort-package-json, so repository moves after license
  • Once this merges, the ESLint 10 bump drops out of #272, and Renovate folds TypeScript 7 from #271 into it
    • TypeScript 7 passes verify:all on this branch

🤖 Generated with Claude Code

Lint with oxlint's correctness, suspicious and perf categories plus a few
overrides, with type-aware rules via oxlint-tsgolint. Format with oxfmt,
which also sorts imports and package.json keys, so sort-package-json goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@will-molloy
will-molloy marked this pull request as ready for review November 27, 2026 13:51
@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.78%. Comparing base (ca0d86d) to head (236d837).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #277      +/-   ##
==========================================
+ Coverage   76.47%   78.78%   +2.31%     
==========================================
  Files           2        2              
  Lines          34       33       -1     
  Branches        4        4              
==========================================
  Hits           26       26              
+ Misses          7        6       -1     
  Partials        1        1              
Flag Coverage Δ
unit-tests-macos-latest 78.78% <100.00%> (+2.31%) ⬆️
unit-tests-ubuntu-latest 78.78% <100.00%> (+2.31%) ⬆️
unit-tests-windows-latest 78.78% <100.00%> (+2.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

will-molloy and others added 3 commits November 28, 2026 00:56
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The separate group kept typescript-eslint lag from blocking the js group,
and oxlint-tsgolint ships its own TypeScript.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@will-molloy
will-molloy merged commit 5804002 into main Nov 27, 2026
13 checks passed
@will-molloy
will-molloy deleted the oxlint branch November 27, 2026 14:01
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.

Consider moving linting from ESLint to oxlint

1 participant