import-js / import-js/eslint-plugin-import
Errors when importing external ES6 module as well as internal module (webpack resolver)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
There seems to be a strange issue with eslint-import-resolver-webpack where when importing an internal module (webpack resolve alias) in conjunction with an external ES6 module (not transpiled).
import { get } from 'lodash-es'; // external es6 module
import Thing from 'app/components/Thing'; // internal module
import anotherThing from './relative/path'; // relative path
When this occurs, there are a bunch of errors on the lodash-es import complaining: Resolve error: Unexpected reserved word.
The internal module also has an error complaining that 'app' should be listed in the project's dependencies.
Removing either the external es6 module or the internal module fixes both of these errors, however.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the shown lodash-es, webpack alias, and relative imports using eslint-import-resolver-webpack. Trace why resolving the external ES6 module triggers both the reserved-word and dependency errors; done means all three imports resolve without either error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript, webpack
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100