microsoft / microsoft/TypeScript

tsconfig - Ignore errors by ids

Open
#29,950 24 comments 156 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

I know that all errors in TypeScript are optional, it'd be nice if we could declare which error ids we want to ignore.

I.E. In the tsconfig.json:

{
   "compilerOptions":{
      "ignoreErrors":[2403,2686,...]
   }
}

The reason I say this is because a lot of these errors are just irratating... Like the error:

'L' refers to a UMD global, but the current file is a module. Consider adding an import instead.

This isn't an actual type error. It's a code style suggestion, and is entirely subjective unlike invalid type errors. I find many little 'errors' like this and they are deeply frustrating, as they just fill the error log with rubbish... Allow us to define which error ids we want to ignore, and this won't happen.

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 with the tsconfig.json compilerOptions proposal and the diagnostic IDs shown in the issue, including 2403 and 2686. Determine how a configuration would identify diagnostics to suppress and verify that the listed errors no longer appear while other diagnostics remain visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.