Title: feat(lint): self-documenting diagnostics — suppression-comment hover, clickable rule docs, diagnostic tags · Issue #27 · rstackjs/rstack-editor · GitHub
Open Graph Title: feat(lint): self-documenting diagnostics — suppression-comment hover, clickable rule docs, diagnostic tags · Issue #27 · rstackjs/rstack-editor
X Title: feat(lint): self-documenting diagnostics — suppression-comment hover, clickable rule docs, diagnostic tags · Issue #27 · rstackjs/rstack-editor
Description: 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-promise...
Open Graph Description: 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 // rsli...
X Description: 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 // rsli...
Opengraph URL: https://github.com/rstackjs/rstack-editor/issues/27
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(lint): self-documenting diagnostics — suppression-comment hover, clickable rule docs, diagnostic tags","articleBody":"## Summary\n\nMake Rslint diagnostics self-documenting in the editor. Three capabilities, ordered by how much of the work lives in this repo:\n\n1. **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).\n2. **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`.\n3. **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`.\n\n## Where the work lives\n\n| Piece | Repo | Effort |\n| --- | --- | --- |\n| Hover over disable-comment rule ids (`languages.registerHoverProvider`, derive docs URL from rule id) | this repo, client-side | 2–3 days |\n| `codeDescription.href` + `DiagnosticTag` on published diagnostics | Rslint upstream (Go LSP) | ~1 day |\n\nThe client-side hover can ship independently of the upstream half.\n\n## Constraints\n\n- `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.\n- 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.\n- The upstream half needs an issue/PR on web-infra-dev/rslint; link it here once filed.\n\n## References\n\n- Ruff hover over suppression codes: https://docs.astral.sh/ruff/editors/features/\n- vscode-eslint `codeDescription` / `DiagnosticTag` usage: https://github.com/microsoft/vscode-eslint\n- LSP `codeDescription`: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnostic\n","author":{"url":"https://github.com/fi3ework","@type":"Person","name":"fi3ework"},"datePublished":"2026-08-20T08:55:12Z","url":"https://github.com/rstackjs/rstack-editor/issues/27"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:474b49a9-4533-1d35-31d9-6642e86d503c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E47A:27960B:8579B4:B357CF:6AEC3BCF |
| html-safe-nonce | aa6cbf2f98ad3f1a98451738bbd4e8192a4fd3f7935f3f13fe950b0b8ed736e7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDdBOjI3OTYwQjo4NTc5QjQ6QjM1N0NGOjZBRUMzQkNGIiwidmlzaXRvcl9pZCI6IjgzOTM0NDk1MTk4MjMwODMwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d35150a76b66b58042de8a745b0f1f4e1eccf21b9925cfa138065af2b0ead4d4 |
| hovercard-subject-tag | issue:5201571024 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rstackjs/rstack-editor/27/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b35664aeaaa2b9e6275a00e11c15ba7bea1ebc79712f33a414efa5383152ebc/rstackjs/rstack-editor/issues/27 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b35664aeaaa2b9e6275a00e11c15ba7bea1ebc79712f33a414efa5383152ebc/rstackjs/rstack-editor/issues/27 |
| og:image:alt | 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 // rsli... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fi3ework |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1dcf8db8e9101b96aecb2bc4e1fd095c110db63a7a140d8a7a9de997e07663e3 |
| turbo-cache-control | no-preview |
| go-import | github.com/rstackjs/rstack-editor git https://github.com/rstackjs/rstack-editor.git |
| octolytics-dimension-user_id | 129049372 |
| octolytics-dimension-user_login | rstackjs |
| octolytics-dimension-repository_id | 1316963958 |
| octolytics-dimension-repository_nwo | rstackjs/rstack-editor |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1316963958 |
| octolytics-dimension-repository_network_root_nwo | rstackjs/rstack-editor |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c248a9ae2572141cd7b35bf30a770cdc842dbc35 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width