-
-
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
import/no-unresolved does not report none-existing function in Yarn workspace #1832
Comments
I assume this is because the ExportMap doesn't traverse symlinks - does it fail as expected when things are installed, not symlinked in? |
I have the same issue in monorepo. |
@SanjiKir you'd have to provide a custom resolver if you have a custom layout, including any "workspaces" things. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed that
import/no-unresolved
is not warning me when I forgot to export a function from a Yarn workspace which will be imported from another Yarn workspace.I created a minimal repo https://github.com/chrisdoc/eslint-plugin-import-bug-minimal-repo which consists of two workspaces
foo
andbar
.Inside
foo/index.js
there is a single functionhelloFoo
which is exported so that it can be consumed bybar
Now in
bar/index.js
I import bothhelloFoo
and a none existinghelloFooV2
via:Now when I run
yarn lint
no errors are reported:When I then try to execute
yarn bar
which callsbar/index.js
NodeJS fails due to callinghelloFooV2
which does not exist.Here you can see an example being run on Github Workflows that shows that
yarn lint
succeeds and thatyarn bar
failshttps://github.com/chrisdoc/eslint-plugin-import-bug-minimal-repo/runs/787914292
The text was updated successfully, but these errors were encountered: