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

No named exports found in module refer to mjs file

Open
#2,228 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

`exports` support
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.