import-js / import-js/eslint-plugin-import
No named exports found in module refer to mjs file
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
ref #2093 https://github.com/standard/standard/issues/863
```js
// File a.mjs
export const A = 'a'
// File b.js
export * from './a.mjs'
// File c.js
export * from './b.js'
```
```bash
eslint c.js
# output
# 1:15 error No named exports found in module './b.js' import/export
eslint c.js --ext .js,.mjs
# output
# 1:15 error No named exports found in module './b.js' import/export
```
only renaming `a.mjs` to `a.js` can workaround this problem
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
Start by reproducing the example with a.mjs, b.js, and c.js using the two eslint commands shown. Read the import/export rule's handling of re-exported modules, then verify that the mjs export is recognized through both files without the false error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100