import-js / import-js/eslint-plugin-import

import/named does not report non-existent exports in yarn workspace

Open
#2,005 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
JavaScript
Stars
5.9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

![Screen Shot 2021-03-12 at 9 45 07 AM](https://user-images.githubusercontent.com/16400333/110978069-c6ef7380-8317-11eb-89f5-b89f29afeb1f.png)

https://github.com/jd2rogers2/eslint-plugin-import-bug-minimal-repo for testing it for yourself

as seen above, no report for `import/named` despite not having an `helloFooV2` export from `foo/index.js`
`foo` and `bar` are both separate workspaces, `bar` lists `foo` as a dependency, and foo is in `node_modules`
i would expect it to report
maybe a larger issue as there is also https://github.com/benmosher/eslint-plugin-import/issues/1832

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the missing report with the linked eslint-plugin-import-bug-minimal-repo, focusing on import/named and the foo/index.js export used by the separate yarn workspaces. Check how the foo dependency is resolved from node_modules and compare that behavior with the expected nonexistent helloFooV2 export report. Done means the rule reports the missing export in this workspace setup without regressing existing cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.