tsconfig - Ignore errors by ids
See original GitHub issueI 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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:100
- Comments:16 (2 by maintainers)
Top Results From Across the Web
Possibility of Suppressing any error (e.g. incl. TS7017) within ...
As of TypeScript 2.6 (released on Oct 31, 2017), there is a way to ignore all errors from a specific line using //...
Read more >How to (temporarily!) ignore errors during a TypeScript migration
Tsc-silent lets you ignore certain TypeScript errors. By ignoring the errors that came from code not yet migrated, I could add TypeScript to...
Read more >Stats - webpack
Tells stats whether to group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent). module.exports = { //... stats: { ...
Read more >TypeScript configuration - Angular
At the root tsconfig.json file specifies the base TypeScript and Angular compiler ... it still generates the JavaScript files, but it also reports...
Read more >Pages - Stickler CI
Stickler CI can automatically fix style errors in several languages. ... Options. ignore A comma separated list of rule ids to ignore.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It would be nice to have this functionality similar to -nowarn in C#. However, I find it useful to specify a paths where certain errors are ignored.
@sancarn, you may consider using https://github.com/evolution-gaming/tsc-silent.
Once installed it supposed to replace
tsc
@caleb15 http://birukov.me/blog/all/tsc-silent.html