-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Bug: parser can't resolve imports when a package is using typesVersions
#107
Comments
Interesting, I've never used
Just notice it is about 3rd-party integration. |
Unfortunately, I'm not familiar with Typescript parser. |
I'll take a look when I'm free then. |
It should be related to #85 |
|
After thinking, I'd like to only support less TypeScript versions to reduce the complexity of this resolver. |
…3010) <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> ## Bug Bumps `eslint-import-resolver-typescript` in `eslint-config-next` to the latest version to pick up a fix from `3.1.0`. As mentioned here, import-js/eslint-import-resolver-typescript#107, the typescript parser is unable to resolve the `typesVersions ` field in their `package.json`. An example repo using this is [`@vercel/examples-ui`](https://github.com/vercel/examples/blob/385a2e968619f9e50f488e2857e021841ae61030/packages/ui/package.json#L14-L22) which will report an eslint `import/no-unresolved` error when using the previous version of `eslint-import-resolver-typescript` (see import-js/eslint-import-resolver-typescript#107). This was fixed in import-js/eslint-import-resolver-typescript#110 This can be locally fixed by bumping `>[email protected]` but decided it should be resolved here too. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [x] Errors have a helpful link attached, see `contributing.md` Closes: #41786 Co-authored-by: JJ Kasper <[email protected]>
As seen in the screenshot, VSCode's intellisense is having no problem resolving the module, but import plugin is unable to find the module. I'm using stock settings for eslintrc and
parserOptions
.The package in question is using
typesVersions
to "map" the files indist
directory to module names - https://github.com/mozilla/glean.js/blob/main/glean/package.json#L19-L49The text was updated successfully, but these errors were encountered: