-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Typescript] Lookup for external modules in @types folder. #1526
Conversation
4 similar comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, didn't known about this option before.
@benmosher @ljharb any time to review this one liner? (and maybe while you're at it, also #1528. These two are breaking for TS users with the new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we could get a test for this?
@ljharb I assumed we didn't test configs, as there are no tests for any of them. The Happy to test that the config sets that setting? |
@joaovieira while that is quite true that we don't already (my bad) it's still better to add one, as if something's not tested, that tells me it's ok to break :-) |
f46dc45
to
64c0823
Compare
7cec495
to
34b1574
Compare
I'm not sure why the travis tests are failing; this test passes for me locally. |
d82d356
to
f134475
Compare
@ljharb fixed. Mocha doesn't seem to play nicely with globs. Decided to put the config tests next to all the others to simplify. |
f134475
to
ae747c0
Compare
Why
When using TypeScript an external module can be resolved to its type definition file located in
node_modules/@types
fromeslint-import-resolver-typescript@2.0.0
. At the moment, that module would be marked as "internal" because the module is not found directly insidenode_modules
, but instead nested inside@types
.What
This PR just adds the
node_modules/@types
folder to lookup for external modules when using the TypeScript config.Fixes #1525. Fixes #1541.