Skip to content

Allow ignoring certain TS suggestion-level diagnostic codes #28825

@jsayol

Description

@jsayol

Related to what was discussed in microsoft/vscode#61326.
Would provide more granularity to the settings introduced with microsoft/vscode#46590.

It might be useful to introduce a new setting to ignore certain suggestion diagnostic codes while still keeping suggestion diagnostics enabled, rather than having to disable them altogether.

What I'm proposing is to introduce 2 new settings, javascript.suggestionActions.ignoredCodes and typescript.suggestionActions.ignoredCodes. These would take a list of suggestion diagnostic codes that the user wants to ignore, given as a string of either comma- or space-separated code numbers.

Example:

{
  // ...

  "typescript.suggestionActions.enabled": true,
  "typescript.suggestionActions.ignoredCodes": "7043, 80006"

  // ...
}

This list would only be checked when a suggestion-level diagnostic is received, so including non-suggestion-level diagnostic codes in the list would have no effect (errors and messages would not be ignored).

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions