Repository navigation
build: migrate from eslint to oxlint - #50691
Merged
Merged
Conversation
Consolidates the root .eslintrc.json and five nested configs (build, script, docs, default_app, spec) into a single .oxlintrc.json at the repo root. script/lint.js now shells out to the oxlint binary from node_modules/.bin instead of using the ESLint Node API, and emits GitHub Actions annotations directly via --format=github in CI (replacing the deleted eslint-stylish problem matcher). Oxlint has no markdown processor, so the ESLint-based lint of JS code blocks in docs/**/*.md is replaced with an inline regex check for bare Node.js builtin imports. This preserves the rule docs/.eslintrc.json was originally added for in #42113; the rest of the standard ruleset on docs code blocks was already being enforced in parallel by lint-roller-markdown-standard.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
No Release Notes |
Contributor
|
I was unable to backport this PR to "42-x-y" cleanly; |
Contributor
|
I was unable to backport this PR to "40-x-y" cleanly; |
Contributor
|
I was unable to backport this PR to "39-x-y" cleanly; |
Contributor
|
I was unable to backport this PR to "41-x-y" cleanly; |
5 tasks done
Contributor
4 of 5 tasks
Contributor
MarshallOfSound
pushed a commit
that referenced
this pull request
May 2, 2026
* build: replace eslint with oxlint and add oxfmt 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). * chore: apply oxfmt formatting and oxlint fixes One-time application of the new linting and formatting rules to the 41-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 - no-only-tests/no-only-tests in spec-helpers.ts - Restore bare require() in preload-sandbox.js test assertions (oxfmt incorrectly converted bare specifiers to node: protocol, defeating the equivalence test) Pure formatting and lint suppression; no behavioral changes.
MarshallOfSound
pushed a commit
that referenced
this pull request
May 2, 2026
* build: replace eslint with oxlint and add oxfmt 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). * chore: apply oxfmt formatting and oxlint fixes 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.
5 tasks done
Contributor
MarshallOfSound
pushed a commit
that referenced
this pull request
May 7, 2026
* build: replace eslint with oxlint and add oxfmt 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). * chore: apply oxfmt and oxlint formatting changes Run oxfmt --write and oxlint --fix across all JS/TS sources to apply the new formatting and lint rules from the previous commit. * chore: remove accidentally-included CLAUDE.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces ESLint and its plugin ecosystem with oxlint. Part of aligning JS tooling across the org.
.eslintrc.jsonplus 13 nested configs into a single.oxlintrc.jsonscript/lint.jsspawns theoxlintbinary directly instead of the ESLint Node API; emits GitHub Actions annotations natively (--format=github), so the eslint-stylish problem matcher is droppedno-restricted-importsrules fromlib/**/.eslintrc.jsonare preserved as overridesmocha/no-exclusive-testsis replaced by a ~25-line in-repo plugin atscript/lint-plugins/no-only-tests.mjsnode:builtins in code blocks (the only rule that pass was added for in chore: lint code blocks in docs with ESLint #42113); broaderstandardenforcement on docs code blocks already runs via@electron/lint-rolleryarn.lock: -1913 / +235 lines, ~160 transitive packages removedyarn lint:jsover 569 files: ~640msA handful of pre-existing warnings that ESLint was lenient on are addressed inline (mostly
_-prefixing unused leading args before a rest spread, plus two targeted disables where oxlint's stricter analysis flags intentionalthrow error/reject(string)).Notes: none