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 [import/named] for importing from a module which re-exports named exports from a node_modules module #1447

Merged
merged 1 commit into from Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/files/re-export-node_modules.js
@@ -0,0 +1 @@
export * from 'eslint'
1 change: 1 addition & 0 deletions tests/src/rules/named.js
Expand Up @@ -26,6 +26,7 @@ ruleTester.run('named', rule, {
test({code: 'import { destructingRenamedAssign } from "./named-exports"'}),
test({code: 'import { ActionTypes } from "./qc"'}),
test({code: 'import {a, b, c, d} from "./re-export"'}),
test({code: 'import {RuleTester} from "./re-export-node_modules"'}),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I chose eslint as the node_module and RuleTester as the import because I figured that'd be pretty stable. It's unlikely that export would change, and in the event that it does, we'll need to update this test file quite a bit anyway.


test({ code: 'import { jsxFoo } from "./jsx/AnotherComponent"'
, settings: { 'import/resolve': { 'extensions': ['.js', '.jsx'] } } }),
Expand Down