Repository navigation
chore(lint): upgrade oxlint to 1.71 + enable 7 new rules (autofixed backlog) - #6841
Merged
Merged
Conversation
Upgrade oxlint 1.67.0 -> 1.71.0 (1.72 was blocked by the repo's 3-day minimum-release-age supply-chain guard; nothing here needs it). The bump is a no-op on the existing config. Enable 3 error rules (backlog autofixed to zero in this commit) and 4 warn rules (surface signal without gating CI): error (autofixed, behavior-preserving): - unicorn/prefer-node-protocol (~1531 sites: bare builtin -> node:) - typescript/no-import-type-side-effects (~36: all-inline-type -> import type) - unicorn/no-array-reverse (19: copy-then-reverse -> toReversed) warn (real signal, current fires are test-only/correct): - unicorn/no-array-fill-with-reference-type (aliasing footgun guard) - typescript/no-unsafe-function-type (bans bare Function type) - unicorn/prefer-array-flat-map (map().flat() -> flatMap()) - unicorn/prefer-regexp-test (.match() in bool ctx -> .test()) mobile/.oxlintrc.json extends root, so it inherits all 7; the autofix ran from root and covered mobile/ too. Verification (all green): oxlint 0 errors (root+mobile+aux configs), oxfmt clean, typecheck (node+cli+web), vitest 22795 passed / 0 failed, builds (electron-vite + web + cli) succeed. node: rewrites confirmed to skip embedded SSH/CLI string payloads (AST-only); all toReversed sites verified to operate on fresh copies or write-once locals.
mobile/ is a standalone pnpm project pinning its own [email protected], which lacks unicorn/no-array-fill-with-reference-type (needs >=1.70). Since mobile/.oxlintrc.json extends the root config, mobile CI's 'cd mobile && oxlint' failed to parse the new rule. Bump mobile to match root (1.71). Verified in mobile/: oxlint 0 errors, oxfmt --check clean, tsc --noEmit pass, vitest 978 passed / 0 failed. Co-authored-by: Orca <[email protected]>
AmethystLiang
added a commit
that referenced
this pull request
Jun 30, 2026
The oxlint 1.71 upgrade (#6841) autofixed these imports to the node: protocol, which Metro can't resolve in a React Native bundle, breaking the Android release build ("Unable to resolve module node:buffer"). Revert to the npm 'buffer' polyfill and disable prefer-node-protocol for the mobile package so the autofix can't reintroduce the regression. Co-authored-by: Orca <[email protected]>
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…acklog) (stablyai#6841) * chore(lint): upgrade oxlint to 1.71 and enable 7 new rules Upgrade oxlint 1.67.0 -> 1.71.0 (1.72 was blocked by the repo's 3-day minimum-release-age supply-chain guard; nothing here needs it). The bump is a no-op on the existing config. Enable 3 error rules (backlog autofixed to zero in this commit) and 4 warn rules (surface signal without gating CI): error (autofixed, behavior-preserving): - unicorn/prefer-node-protocol (~1531 sites: bare builtin -> node:) - typescript/no-import-type-side-effects (~36: all-inline-type -> import type) - unicorn/no-array-reverse (19: copy-then-reverse -> toReversed) warn (real signal, current fires are test-only/correct): - unicorn/no-array-fill-with-reference-type (aliasing footgun guard) - typescript/no-unsafe-function-type (bans bare Function type) - unicorn/prefer-array-flat-map (map().flat() -> flatMap()) - unicorn/prefer-regexp-test (.match() in bool ctx -> .test()) mobile/.oxlintrc.json extends root, so it inherits all 7; the autofix ran from root and covered mobile/ too. Verification (all green): oxlint 0 errors (root+mobile+aux configs), oxfmt clean, typecheck (node+cli+web), vitest 22795 passed / 0 failed, builds (electron-vite + web + cli) succeed. node: rewrites confirmed to skip embedded SSH/CLI string payloads (AST-only); all toReversed sites verified to operate on fresh copies or write-once locals. * chore(lint): bump mobile oxlint to 1.71 so inherited rules parse mobile/ is a standalone pnpm project pinning its own [email protected], which lacks unicorn/no-array-fill-with-reference-type (needs >=1.70). Since mobile/.oxlintrc.json extends the root config, mobile CI's 'cd mobile && oxlint' failed to parse the new rule. Bump mobile to match root (1.71). Verified in mobile/: oxlint 0 errors, oxfmt --check clean, tsc --noEmit pass, vitest 978 passed / 0 failed. Co-authored-by: Orca <[email protected]> --------- Co-authored-by: Orca <[email protected]>
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
The oxlint 1.71 upgrade (stablyai#6841) autofixed these imports to the node: protocol, which Metro can't resolve in a React Native bundle, breaking the Android release build ("Unable to resolve module node:buffer"). Revert to the npm 'buffer' polyfill and disable prefer-node-protocol for the mobile package so the autofix can't reintroduce the regression. Co-authored-by: Orca <[email protected]>
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.
What
Upgrade oxlint
1.67.0→1.71.0and turn on 7 new lint rules mined from the rule catalog and validated against the real Orca tree. The version bump itself is a verified no-op on the existing config — all value is in the newly-enabled rules.Rules enabled
error— existing backlog autofixed to zero in this commit (runoxlint --fix, then flip on), so CI stays green:unicorn/prefer-node-protocolnode:prefix (completes a half-done migration; disambiguates builtins)typescript/no-import-type-side-effectstypeimports →import type(pre-empts a real footgun underverbatimModuleSyntax)unicorn/no-array-reversereverse()→ alias-safetoReversed()warn— real signal, but current fires are test-only / already-correct, sowarnavoids gating CI on correct code:unicorn/no-array-fill-with-reference-typenew Array(n).fill({})aliasing — the bug that silently flips every row in a state arraytypescript/no-unsafe-function-typeFunction(accepts any args, returnsany); all current fires are mocks in one test fileunicorn/prefer-array-flat-map.map(fn).flat()→.flatMap(fn)unicorn/prefer-regexp-test.match()in boolean context →.test()mobile/.oxlintrc.jsonextends the root config, so it inherits all 7; the autofix ran from root and coveredmobile/too.Why these (and not others)
I empirically scanned every currently-disabled rule against the codebase, read each candidate's docs, and adversarially verified the shortlist against the team's deliberately-curated config. These 7 are the ones that are either safe-autofixable value-adds or clear bug-catchers. High-noise / stylistic rules (
no-await-in-loop,prefer-string-replace-all,prefer-single-call,no-console, the fullreact-perfcategory, etc.) were rejected — see the "considered but skipped" notes in the PR discussion.Autofix safety review
The autofix touched 631 files. I verified the semantic-changing rewrites by hand:
node:rewrites are AST-only — embeddedrequire('fs')/require('net')string payloads shipped to remote SSH/CLI hosts (agent-status-extension-source.ts,ssh-remote-commands.ts, the payload sections ofssh-relay-deploy.ts/hook-service.ts) were not modified. Only real top-levelimport/requirestatements changed..reverse()→.toReversed()is mutating → non-mutating. I inspected all 19 sites: every one operates on a fresh copy ([...x],.slice(),Array.from(), or a function returning a new array) or a write-once local iterated exactly once — no code relied on in-place mutation.import typeconsolidation is pure module-syntax; mixed value+type imports were left alone.Verification (all green)
oxlint --format github(CI's exact cmd)oxfmt --checkon changed filespnpm typecheck(node + cli + web)pnpm test(vitest)build:electron-vite+build:web+build:cliNo functional regressions.
Deferred (intentionally not in this PR)
react-perfplugin is loaded but itsperfcategory is off — those rules currently enforce nothing. Separate decision: enable the specificreact-perf/*rules atwarn(a hard flip is infeasible —jsx-no-new-function-as-propalone is ~3k prod sites) or drop the plugin. Not bundled here to keep this PR mechanical.unicorn/prefer-import-meta-properties(36) — autofix orphans the now-unusednode:url/node:pathimports, whichno-unused-vars=errorthen fails on; needs a manual-cleanup PR.unicorn/prefer-export-from(18 w/checkUsedVariables:false) — suggestion-only; needs--fix-suggestions+pnpm format.Made with Orca 🐋