Ignore errors from libs in node_modules
folders
#110
Merged
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.
I've tried a few different things here but it seems that ignoring diagnostics from
node_modules
folders is a good enough workaround.An actual solution for this would be support from
tsc
to allow type-checking project-local.d.ts
files while skipping.d.ts
files fromnode_modules
. The way things are right now,skipLibCheck
will disable type-checking.d.ts
files everywhere which we definitely don't want. On the other hand, skipping type-checking for types fromnode_modules
would bring enormous performance improvements, most time is spent by checking types there.I've also tried to mess a bit with
tsc
, mostly by monkey-patching stuff. The problem is that it's pretty much impossible to know in advance which.d.ts
files are required to correctly type check an application and which ones not. It mostly boils down to.d.ts
files exposing stuff in the global scope or declaring modules with different names than the module they belong to. Most other cases should be discoverable by analyzing forimport
s,<reference ...
directives and the like.Fixes #45
Fixes #76
Fixes #30