import-js / import-js/eslint-plugin-import
import/named not throwing an error when importing invalid function names from transpiled bundles
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
I expect the following to throw an error that `doesNotExist` is not exported from `react` and so on for each of these lines:
```
import { doesNotExist } from 'react';
import { doesNotExist2 } from 'redux';
import { doesNotExist3 } from '../dist/external';
```
However, no import-related linting error is thrown.
I've provided an example branch here: https://github.com/steveharrison/import-linting-example. To reproduce: run `npm ci`, build an example third-party module with `npm run build:external`, and then run `npm run lint`.
Do you know how I can get invalid import linting errors thrown for all of these lines?
Contributor guide
Research direction
Start with the linked import-linting-example branch: run npm ci, npm run build:external, and npm run lint to reproduce the missing errors. Inspect the lint configuration and the transpiled external bundle, then verify that invalid imports from react, redux, and ../dist/external are all reported.
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