Skip to content
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

Cannot resolve estree types #62

Closed
benmccann opened this issue Dec 9, 2020 · 4 comments
Closed

Cannot resolve estree types #62

benmccann opened this issue Dec 9, 2020 · 4 comments
Labels

Comments

@benmccann
Copy link
Contributor

Steps to reproduce

This repo is setup with pnpm, which helps putting multiple packages in a single repo. You can install with npm install -g pnpm if you don't have it already.

git clone git@github.com:benmccann/plugins.git
cd plugins
git checkout pluginutils-eslint
pnpm install
cd packages/pluginutils
pnpm lint

Actual results

packages/pluginutils/src/extractAssignedNames.ts
7:8 error Unable to resolve path to module 'estree' import/no-unresolved

Expected results

I'd expect this to pass linting since the root directory contains an node_modules/@types/estree/index.d.ts file with the types.

Maybe it doesn't work when there's only types and not the actual .js code? Or maybe it doesn't know how to look in the node_modules of parent directories? Or maybe I just messed something up in the setup?

@JounQin
Copy link
Collaborator

JounQin commented Dec 10, 2020

Have you tried alwaysTryTypes option?

@benmccann
Copy link
Contributor Author

@JounQin
Copy link
Collaborator

JounQin commented Dec 10, 2020

There are two typescript keys in your config, which makes the first one being overridden, what means alwaysTryTypes is actually not working.

@benmccann
Copy link
Contributor Author

Ah, thanks!! I've sent a PR to clarify the docs about this point: #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants