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

import/named does not detect a missing import

Open
#2,209 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

`import/named` should report for the following, but does not:

```js
import { doesNotExist } from './upstream';
```

I've repro'd this in both `2.34.4` and `2.24.2`, and with both JS and TS: [repro repo](https://github.com/NickHeiner/repro/tree/master/cases). To repro this, run:

```
yarn workspace eslint-plugin-import-2209-v2.24.2 test
```

Possibly related:
* https://github.com/import-js/eslint-plugin-import/issues/2005

Did I do something wrong in my setup?

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

Run the reproduction with `yarn workspace eslint-plugin-import-2209-v2.24.2 test` and compare the `import/named` rule's behavior for the JavaScript and TypeScript cases. Trace the rule's handling of `import { doesNotExist } from './upstream';`; done means the missing named import is reported in both cases.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.