Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash due to export * with no-unused-modules #1496

Merged
merged 1 commit into from
Dec 5, 2019

Conversation

Taranys
Copy link
Contributor

@Taranys Taranys commented Oct 8, 2019

fix #1382

After investigating, It comes from this line
https://github.com/benmosher/eslint-plugin-import/blob/5e143b23f3b89096e1b6a268af723f60c1ecb22f/src/ExportMap.js#L316

In my case, export * from 'redux-starter-kit' is not detected as unambigous and it return null which crash no-unused-modules

I didn't find any good way to test it. I'm looking forward for some advices on how I can test this issue :)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 96.029% when pulling 98a2dcc on Taranys:bug/fix-1382 into 5e143b2 on benmosher:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 96.029% when pulling 98a2dcc on Taranys:bug/fix-1382 into 5e143b2 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 96.029% when pulling 98a2dcc on Taranys:bug/fix-1382 into 5e143b2 on benmosher:master.

@coveralls
Copy link

coveralls commented Oct 8, 2019

Coverage Status

Coverage increased (+0.4%) to 96.53% when pulling 0cd5e43 on Taranys:bug/fix-1382 into 05085bb on benmosher:master.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

To test it, please add some files in https://github.com/benmosher/eslint-plugin-import/tree/master/tests/files that can reproduce the issue.

src/rules/no-unused-modules.js Outdated Show resolved Hide resolved
@soryy708
Copy link
Contributor

Is this related? #1260

@Taranys
Copy link
Contributor Author

Taranys commented Nov 5, 2019

@soryy708 Don't seems related to me.

From my investigation, it seems that common-js compiled files are not properly managed if you do an export * from 'external-lib'

@Taranys
Copy link
Contributor Author

Taranys commented Nov 28, 2019

@ljharb I added a test :)

@ljharb
Copy link
Member

ljharb commented Nov 30, 2019

@Taranys i rebased this, but tests are failing (altho, these tests might be failing on master)

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as long as tests pass

@ljharb ljharb merged commit 0cd5e43 into import-js:master Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

import/no-unused-modules crashes linter
4 participants