feat(playground): introduce dependency types support and allow @rstest/core - #2126
Conversation
@rstest/core
Deploying rslint with
|
| Latest commit: |
e3917c4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://59682d0f.rslint.pages.dev |
| Branch Preview URL: | https://feat-playground-source-types.rslint.pages.dev |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ca6bb6fb9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 314d24c0a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4c36ad96f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b4c36ad to
91596f7
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Motivation
When sharing
@rstest/corerule examples in the Playground, the editor reports unresolved imports and type-aware rules cannot see the corresponding package types.Changes
Following the existing
rslint.config.jstype loading approach, the Playground now resolves supported package declarations from esm.sh and installs them into Monaco. The same declarations are also passed to the wasm lint request through the virtual file system, with an in-memorycompilerOptions.pathsmapping so type-aware rules can resolve them without changing the user's visible tsconfig.The source dependency support is catalog-driven: each entry defines the import pattern, esm.sh package URL, Monaco mount path, and lint VFS path. This makes
@rstest/corethe first supported dependency without baking Rstest-specific loading logic into the Playground.This change currently detects static import/export forms such as
from '@rstest/core'. It loads the bundled Rstest declaration together with its supported Chai declaration graph, while code without a supported import keeps the existing behavior and does not fetch dependency types.Current declaration sizes from esm.sh:
@rstest/core@0.11.12@types/chai@5.2.3@types/deep-eql@4.0.2assertion-error@2.0.1