Skip to content

chore: use oxfmt and oxlint in 42-x-y - #51435

Merged
MarshallOfSound merged 2 commits into
42-x-yfrom
chore/oxfmt-oxlint--42-x-y
May 2, 2026
Merged

MarshallOfSound merged 2 commits into
42-x-yfrom
chore/oxfmt-oxlint--42-x-y

Conversation

@ckerr

@ckerr ckerr commented May 1, 2026 •

Copy link
Copy Markdown
Member

Description of Change

Manually backport #50691 to 42-x-y. See that PR for details.
Manually backport #50692 to 42-x-y. See that PR for details.
Partial fix for #51429.

The project's old and new formatting styles are not 100% consistent with each other, so recently we've had several trops/backporrts where a human has to manually check out the backport -> run the formatter -> push up the update. This PR fixes the issue for 42-x-y by copying the oxfmt/oxlint tooling from main.

All reviews welcomed, CC @MarshallOfSound, @nikwen as stakeholders.

Checklist

Release Notes

Notes: none.

Replace ESLint and its plugin ecosystem with oxlint (oxc.rs).
Add oxfmt alongside oxlint for JS/TS formatting and import sorting.

- Consolidate root .eslintrc.json plus 13 nested configs into .oxlintrc.json
- script/lint.js spawns oxlint binary directly instead of ESLint Node API
- Per-process no-restricted-imports rules preserved as oxlintrc overrides
- mocha/no-exclusive-tests replaced by in-repo plugin (no-only-tests.mjs)
- docs ESLint pass replaced by inline node: protocol check in lint.js
- .oxfmtrc.json matching repo style (single quotes, semicolons, 2-space)
- yarn lint:fmt (oxfmt --check) chained into yarn lint
- yarn format (oxfmt --write) for local fixup
- lint-staged runs oxfmt --write on staged JS/TS files

This commit contains only rule/tooling infrastructure changes and is
intended to be cherry-picked to other maintenance branches, where
formatting and lint fixes can be applied separately.

Manual backport of e1af67c698 (#50691) and
3c7fd34f47 (#50692).
@socket-security

socket-security Bot commented May 1, 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
Addedoxlint@​1.61.0991009196100

View full report

@ckerr ckerr changed the title Chore/oxfmt oxlint 42 x y chore: use oxfmt and oxlint in 42-x-y May 1, 2026
One-time application of the new linting and formatting rules to the
42-x-y codebase:

- yarn format (oxfmt --write) over all JS/TS sources
- oxlint --fix to restore curly braces where oxfmt removed them
- Prefix unused parameters with _ (no-unused-vars)
- Add eslint-disable-next-line comments for intentional patterns:
  - prefer-promise-reject-errors in desktop-capturer.ts
  - no-throw-literal in preload.ts

Pure formatting and lint suppression; no behavioral changes.
@ckerr
ckerr force-pushed the chore/oxfmt-oxlint--42-x-y branch from 6c2f40b to e16ba1e Compare May 1, 2026 21:25
@ckerr
ckerr marked this pull request as ready for review May 1, 2026 23:59
@MarshallOfSound
MarshallOfSound merged commit 673351b into 42-x-y May 2, 2026
119 of 121 checks passed
@MarshallOfSound
MarshallOfSound deleted the chore/oxfmt-oxlint--42-x-y branch May 2, 2026 22:23
@release-clerk

release-clerk Bot commented May 2, 2026

Copy link
Copy Markdown

No Release Notes

@ckerr ckerr mentioned this pull request May 5, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants