import-js / import-js/eslint-plugin-import
False positive of `no-import-module-exports` on `module` variable defined in the module
Open
bug
help wanted
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
```js
import 'something'; // => Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi') import/no-import-module-exports
export const module = {};
module.foo = 42;
```
Contributor guide
Research direction
Start by reproducing the issue from the JavaScript example and trace the no-import-module-exports rule's handling of the locally defined module variable. Compare the diagnostic for this case with the rule's intended CommonJS module.exports or exports.bar cases. Done means the false positive is removed while genuine CommonJS export warnings remain covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100