Summary
Make Rslint diagnostics self-documenting in the editor. Three capabilities, ordered by how much of the work lives in this repo:
- Suppression-comment hover — hovering a rule id inside
// rslint-disable-next-line no-floating-promises shows that rule's documentation (description + link to rstack.rs). This answers "why is this line suppressed?" directly at the comment. Neither the ESLint nor the Biome extension offers this; Ruff proves the pattern (ruff server answers textDocument/hover over noqa codes).
- Clickable rule ids in the Problems panel — populate
Diagnostic.codeDescription.href (LSP 3.16) from the rule's docs URL, so the rule id in the Problems panel links straight to the rule's page. dbaeumer.vscode-eslint does exactly this from meta.docs.url.
- Diagnostic tags for dead code — emit
DiagnosticTag.Unnecessary for unused-variable style rules (rendered faded) and DiagnosticTag.Deprecated for deprecated-API rules (rendered struck-through), so squiggles stay reserved for real errors. Also proven by vscode-eslint.
Where the work lives
| Piece |
Repo |
Effort |
Hover over disable-comment rule ids (languages.registerHoverProvider, derive docs URL from rule id) |
this repo, client-side |
2–3 days |
codeDescription.href + DiagnosticTag on published diagnostics |
Rslint upstream (Go LSP) |
~1 day |
The client-side hover can ship independently of the upstream half.
Constraints
stacks/lint is a deliberate near-verbatim copy of the upstream extension with exactly seven documented adaptations (packages/vscode/AGENTS.md). A client-side hover provider is new behavior, not a divergence inside the copied files — implement it as a separate module registered by the stack, and if it must touch copied files, record it as an eighth adaptation in AGENTS.md.
- Docs URL derivation should not hardcode a URL scheme per rule; derive from one base URL + rule id, and degrade gracefully (no hover entry) for rules without docs.
- The upstream half needs an issue/PR on web-infra-dev/rslint; link it here once filed.
References
Summary
Make Rslint diagnostics self-documenting in the editor. Three capabilities, ordered by how much of the work lives in this repo:
// rslint-disable-next-line no-floating-promisesshows that rule's documentation (description + link to rstack.rs). This answers "why is this line suppressed?" directly at the comment. Neither the ESLint nor the Biome extension offers this; Ruff proves the pattern (ruff serveranswerstextDocument/hoverovernoqacodes).Diagnostic.codeDescription.href(LSP 3.16) from the rule's docs URL, so the rule id in the Problems panel links straight to the rule's page.dbaeumer.vscode-eslintdoes exactly this frommeta.docs.url.DiagnosticTag.Unnecessaryfor unused-variable style rules (rendered faded) andDiagnosticTag.Deprecatedfor deprecated-API rules (rendered struck-through), so squiggles stay reserved for real errors. Also proven byvscode-eslint.Where the work lives
languages.registerHoverProvider, derive docs URL from rule id)codeDescription.href+DiagnosticTagon published diagnosticsThe client-side hover can ship independently of the upstream half.
Constraints
stacks/lintis a deliberate near-verbatim copy of the upstream extension with exactly seven documented adaptations (packages/vscode/AGENTS.md). A client-side hover provider is new behavior, not a divergence inside the copied files — implement it as a separate module registered by the stack, and if it must touch copied files, record it as an eighth adaptation in AGENTS.md.References
codeDescription/DiagnosticTagusage: https://github.com/microsoft/vscode-eslintcodeDescription: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnostic