feat(vscode): lint bridged folders from rstack.config via a generated shim - #10
Draft
fi3ework wants to merge 1 commit into
Draft
feat(vscode): lint bridged folders from rstack.config via a generated shim#10fi3ework wants to merge 1 commit into
fi3ework wants to merge 1 commit into
Conversation
… shim A workspace folder with no native rslint.config.* and an rstack.config.* at its root now lints through the Rstack config: the extension writes a generated shim (loadRstackConfig with the absolute config path baked in, lint section default-exported) and pins the language server to it through the optional configPath of rslint/configRefresh (config-discovery protocol 2, rslint PR web-infra-dev/rslint#1630). Bridged mode is gated on the capability, not a version guess: the project's @rslint/core/config-loader must report protocol >= 2. Below that (every released version today) the folder reports a version mismatch naming the resolved version instead of starting a half-bridge, and never reports crashed - @rslint/core reaches such projects only as rstack's transitive dependency. Ownership stays folder-level: one native config anywhere and the bridge yields; a mode flip restarts the server through the coordinator's replacement path, since the explicit-config choice is fixed for a server process. The E2E bridge suite asserts the gate path against today's @rslint/core 0.7.3 and carries the explicit-mode happy path behind a runtime skip that unlocks when a protocol-2 release ships.
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
A workspace folder whose only lint signal is a root
rstack.config.*now lints through the Rstack config. The extension writes a generated shim into the project (node_modules/.cache/rstack-editor/rslintConfig.mjs) that loads the config through rstack's publishedrstack/configexport with the absolute config path baked in, and pins that folder's language server to the shim through the optionalconfigPathofrslint/configRefresh(config-discovery protocol 2, added by web-infra-dev/rslint#1630).rslint.config.*anywhere in the folder and the bridge yields entirely. Only a folder-rootrstack.config.*bridges (the explicit-config choice is fixed per server process, one server per folder, cwd = folder root). A mode flip restarts the server through the coordinator's existing replacement path.@rslint/core/config-loaderto report protocol >= 2. Below that (every released version today) the folder reports a version mismatch naming the resolved version — nevercrashed, since@rslint/corereaches such projects only as rstack's transitive dependency.configPathkey is simply absent and the server keeps doing its own discovery. Every bridge line in the portedRslint.tssits inside paired--- rstack config bridge ---markers (adaptation refactor(vscode): split tests out of src into sibling tests/ and e2e/ trees #7 in AGENTS.md).Why draft
No released
@rslint/corespeaks protocol 2 yet (latest 0.7.3 is protocol 1; rslint#1630 is merged but unreleased). The E2E bridge suite therefore asserts the gate path end to end against 0.7.3, and carries the explicit-mode happy path behind a runtime skip that unlocks when a protocol-2 release ships. Plan: when that release lands, bump the fixture, watch the skipped suite go live, and mark this ready for review.Test plan
pnpm lint— 0 errors, 0 type errorspnpm test:unit— 260 tests, 0 failures (bridge rule/shim/gate covered as pure units)Rstack config bridgesuite asserting the gate behavior against today's@rslint/core