Skip to content

build: migrate from eslint/prettier to oxlint/oxfmt#1073

Merged
MarshallOfSound merged 5 commits into
mainfrom
sam/migrate-to-oxlint
Apr 9, 2026
Merged

build: migrate from eslint/prettier to oxlint/oxfmt#1073
MarshallOfSound merged 5 commits into
mainfrom
sam/migrate-to-oxlint

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Apr 4, 2026

Copy link
Copy Markdown
Member

Replaces ESLint with oxlint and Prettier with oxfmt.

oxlint

  • Remove eslint, @typescript-eslint/*, eslint-config-prettier, eslint-plugin-prettier, eslint-plugin-react
  • Add oxlint@^1.57.0 with .oxlintrc.json (react + typescript plugins, correctness: error, no-unused-vars warn with ^_ ignore — matches previous config)
  • Rename lint:eslintlint:oxlint, update lint / lint:fix / lint-staged
  • Fix lint:fix which was passing --fix to npm run instead of the underlying command
  • Drop unused catch (error) binding in scripts/tasks/preprocess-api-history.ts flagged by oxlint
  • Existing // eslint-disable-* comments still work; oxlint honors them natively

oxfmt

  • Remove prettier; add oxfmt@^0.42.0
  • .prettierrc / .prettierignore.oxfmtrc.json (generated via oxfmt --migrate=prettier; singleQuote: true, printWidth: 80, all ignore patterns ported incl. docs/)
  • Add lint:fmt script (oxfmt --check .); lint / lint:fix / lint-staged updated
  • lint-staged uses --no-error-on-unmatched-pattern so commits touching only ignored paths (e.g. docs/) don't fail the pre-commit hook
  • oxfmt output is byte-identical to prettier's on this repo — no source files reformatted

docs/latest/.eslintrc.json is left alone; it's synced from electron/electron and not linted here.

yarn lint passes clean. oxlint: 57 files in ~6ms. oxfmt: 239 files in ~550ms.

@MarshallOfSound MarshallOfSound requested a review from a team as a code owner April 4, 2026 08:23
@socket-security

socket-security Bot commented Apr 4, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedoxfmt@​0.42.0901008996100
Updatedtypescript@​5.3.2 ⏵ 5.9.31001009099 -190
Addedoxlint@​1.57.0991009195100

View full report

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 4, 2026

Copy link
Copy Markdown

Deploying electron-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5844076
Status: ✅  Deploy successful!
Preview URL: https://9493e933.electron-website.pages.dev
Branch Preview URL: https://sam-migrate-to-oxlint.electron-website.pages.dev

View logs

@MarshallOfSound MarshallOfSound changed the title build: migrate from eslint to oxlint build: migrate from eslint/prettier to oxlint/oxfmt Apr 4, 2026
@erickzhao erickzhao force-pushed the sam/migrate-to-oxlint branch from fc4d7f3 to 96421a2 Compare April 9, 2026 00:24
@socket-security

socket-security Bot commented Apr 9, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@erickzhao

Copy link
Copy Markdown
Member

Pushed up a new commit:

@MarshallOfSound MarshallOfSound merged commit d7ebec9 into main Apr 9, 2026
6 checks passed
@MarshallOfSound MarshallOfSound deleted the sam/migrate-to-oxlint branch April 9, 2026 07:59
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.

2 participants