microsoft / microsoft/TypeScript

allow wildcards in getSupportedCodeFixes

Open
#28,990 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: API In Discussion Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

I'm developing a LanguageService Plugin for a linter that creates fixable Diagnostics. Unfortunately I don't know the codes and if they are fixable before they actually occur.

AFAICT VSCode handles the case where a Diagnostic's code is supposed to be fixable and getCodeFixes returns no fix.

I'm proposing some kind of wildcard matching or a way to specify that all Diagnostics with a matching Diagnostic.source are considered fixable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the language-service APIs named in the issue, especially getSupportedCodeFixes and getCodeFixes, and compare them with the VSCode handling described. Determine how wildcard or Diagnostic.source matching should define fixability, then verify that diagnostics matching the chosen rule are treated as fixable even when no fix is returned.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.