Repository navigation
lint: parse the project's Oxlint config with the project's Oxlint - #106
Merged
thejackshelton merged 2 commits intoSep 22, 2026
Merged
thejackshelton merged 2 commits into
thejackshelton merged 2 commits into
Conversation
…lint `oxlint-current` is a pin: one Oxlint version, frozen when this package was released. The configuration it has to parse is not pinned at all, because the project owns that file and writes it against whatever Oxlint the project installed. A project whose Oxlint is newer than the pin therefore has its own configuration rejected over rules that do exist, but which the pin has never heard of. Bumping the pin does not fix this. It re-breaks on the next Oxlint release that adds a rule. `selectCanonicalOxlint` resolves the pin first and prefers the project's own Oxlint only when that one is at least as new. An older, absent, or unreadable project Oxlint leaves the pin exactly where it was, so the pin remains the floor that every composition lane here was established against and pinned behaviour cannot regress. This is deliberately not the question `decideCanonicalCommand` answers: that one decides who owns the command name, where a merely transitive Oxlint must not take the name from an explicit oxc-tsrx install. Which binary parses the project's configuration is separate, because a transitively installed Oxlint is still the version the project's configuration was written against. The JS-plugin lane gate now reads the version of the binary that will actually host the lane, rather than the version this package shipped. A rejected configuration was also the one failure whose cause was absent from the message the user saw, which talked about JSON composition instead. It now names the binary that rejected the configuration and where that binary came from. Fixes tsrx-org#105
|
@o-alexandrov is attempting to deploy a commit to the Ripple Team Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 852c12f. Configure here.
…LSP cwd Two review findings on the canonical selector. `oxc-tsrx setup` can write a compatibility facade into the `oxlint` slot, and that facade re-enters this launcher. The previous guard compared manifest paths, but the facade has a path of its own, so the comparison never saw it. A facade whose version reached the pin would therefore have been selected and the launcher would have recursed without bound. It is now identified the way `decideCanonicalCommand` identifies it, by its own `oxcTsrxCompatibility` metadata. The path comparison is kept for what it does cover, which is the pinned package resolving under this one. The LSP multiplexer resolved the selector against `process.cwd()` while spawning its servers in `options.cwd`, so a session could serve one workspace while picking the Oxlint belonging to another tree. It now passes its own cwd, as every other lane does. Also removes the `resolvePackageBinary` imports that the previous commit orphaned in `lint-cli.ts` and `lint-js-plugins.ts`.
This was referenced Sep 22, 2026
Merged
Merged
1 task done
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.

Fixes #105.
The defect
oxlint-currentis a pin: one Oxlint version, frozen when this package was released. The configuration it has to parse is not pinned at all, because the project owns.oxlintrc.jsonand writes it against whatever Oxlint the project installed. A project whose Oxlint is newer than the pin therefore has its own configuration rejected over rules that do exist, but which the pin has simply never heard of.Reproduced on
@tsrx/[email protected](pin[email protected]) against a project on[email protected]:Bumping the pin does not fix this. It re-breaks on the next Oxlint release that adds a rule.
The change
selectCanonicalOxlintresolves the pin first and prefers the project's own Oxlint only when that one is at least as new. An older, absent, or unreadable project Oxlint leaves the pin exactly where it was, so the pin remains the floor that every composition lane here was established against, and pinned behaviour cannot regress.This is deliberately not the question
decideCanonicalCommandanswers. That one decides who owns the command name, where a merely transitive Oxlint must not take the name away from an explicitoxc-tsrxinstall. Which binary parses the project's configuration is a separate question, because a transitively installed Oxlint is still the version that project's configuration was written against.Every lint lane that previously reached for the pin directly now goes through the selector: the
oxlintlauncher, the prestart probe, bothlint-clidelegation paths, both JS-plugin lane paths, and the LSP multiplexer. The JS-plugin lane version gate now reads the version of the binary that will actually host the lane, rather than the version this package shipped.A rejected configuration was also the one failure whose cause was absent from the message the user saw, which talked about JSON composition the user never asked about. The message now names the binary that rejected the configuration and where that binary came from.
The sync project-root walk is kept inside
package-binary.tsrather than shared withprovider-resolve.tson purpose. The VSIX bundlesprovider-resolveby itself, and an import edge between the two modules lets the editor build inline the resolver throughpackage-binaryeven in the contrast fixture that is supposed to fail to resolve it.Verification
Functional, on the issue's minimal reproduction:
1.84.0and exits 0.0.13.0wrapper on the identical tree: reports1.74.0and exits 2 with the error above.oxlintinstalled: still reports1.74.0and exits 0, so the pin remains the floor.Suites, on this machine:
pnpm run build:packages,pnpm run build:editor, andpnpm run licenses:vscode:checkall pass. The committed editor bundle and its bundled-dependency license inventory are regenerated in this commit because the resolver region moved.pnpm run test:packaging:unit: the set of failing tests is identical to the set that fails on an unmodified checkout ofmainat1020dd8. Those remaining failures all need the Rust artifacttarget/release/oxc-tsrx, which this environment cannot build.pnpm test: the same 285 failures occur on both the patched tree and the unmodified baseline, from that same missing Rust artifact. I could not run the lanes that depend on it.tests/packaging/runtime-contract.test.mjsis updated: it pinned the exactimportDeclaredPackageBinary("oxlint-current", "oxlint"call in the launcher. It now asserts that the launcher goes throughimportCanonicalOxlint, that the prestart probe goes throughresolveCanonicalOxlint, and that the pin is still what the selector resolves as a declared npm binary.Note
Medium Risk
Changes which Oxlint binary runs across CLI, LSP, and JS-plugin lanes based on project
node_modulesresolution; behavior should improve for newer project pins but version-selection edge cases could affect lint results.Overview
Fixes config parse failures when a project's installed Oxlint is newer than the
oxlint-currentpin (e.g. unknown rules in.oxlintrc.json).Canonical Oxlint selection adds
selectCanonicalOxlint/resolveCanonicalOxlint/importCanonicalOxlint: start from the pin, then use the project'soxlintwhen its semver is at least as new (with fallbacks for missing installs, the oxc-tsrx compatibility facade, and same-manifest edge cases). The pinned package remains the floor.Call sites that spawned or imported the pin directly now go through this selector—the
oxlintlauncher, composed CLI upstream runs, prestart, JS-plugin projection lane, editor plugin host, and LSP multiplexer. The JS-plugin version gate reads the binary that will actually run.Diagnostics when upstream output is not JSON but mentions a failed config parse now name whether the project's Oxlint or the pin rejected the config and which version.
The VS Code extension bundle inlines the same resolver (project-root walk kept local to
package-binary.tsto avoid bundler coupling); license inventory hashes are refreshed. Packaging contract tests assert the new entry points.Reviewed by Cursor Bugbot for commit 69116a7. Bugbot is set up for automated code reviews on this repo. Configure here.