Add hover support linking eslint-disable directives to rule documentation#2188
Draft
Copilot wants to merge 4 commits into
Draft
Add hover support linking eslint-disable directives to rule documentation#2188Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Copilot
AI
changed the title
[WIP] Add hover link for eslint-disable-next-line directives
Add hover support linking eslint-disable directives to rule documentation
Jun 12, 2026
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.
Hovering an
eslint-disable*/eslint-enabledirective comment now surfaces a link to the referenced rule's documentation, the same way the diagnostic underline does today.Changes
server/src/eslint.ts) — NewDirectiveCommentsnamespace parses a line into the directive keyword plus each referenced rule id with character ranges. Handleseslint-disable,eslint-disable-line,eslint-disable-next-line,eslint-enable; scoped/plugin rule ids; comma-separated lists; the-- descriptionsuffix; and block-comment terminators. ExposesfindRuleAt(exclusive-end token lookup) andcontains(region membership).server/src/eslintServer.ts) — Newconnection.onHoverreturns Markdown links fromRuleMetaData.getUrlfor the rule under the cursor, or all rules when hovering the keyword. AdvertiseshoverProvidercapability. Gated to validated documents and to directives that actually sit inside a comment.Notes
nullfor non-synced/non-validated documents.