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

Add some core-module tests for no-extraneous-dependencies #644

Merged
merged 1 commit into from
Jan 31, 2021

Conversation

gnarf
Copy link
Contributor

@gnarf gnarf commented Oct 31, 2016

Added some test cases (one of which fails) for core-modules in no-extraneous-dependencies

settings: { 'import/core-modules': ['@namespaced/module'] },
}),
test({
code: 'import "@namespaced/module/and/sub/path"',
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'm not sure if this is supposed to work, but I was trying to use core-modules to fix the no-extraneous-dependencies for my webpack resolve.alias that points @namespaced/module/lib/foo to ./src/foo

Maybe related to #479 ?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, weird. Yeah, #479 is the ideal path to resolving this issue without explicit config (Webpack resolver would report as a project or internal) but what you've done should theoretically work.

Must be either the @ or / killing it. I suspect the latter...

@benmosher benmosher added this to the v3 - import/order internal milestone Nov 3, 2016
@ljharb
Copy link
Member

ljharb commented Jan 31, 2021

Rebased this. Part of the issue was that modules have to resolve in order to be reported, and "core-module", for example, didn't exist on disk. I removed one of the namespace tests because @generated/bar is already tested.

@ljharb ljharb force-pushed the extraneous-deps-test-case branch from d93afa0 to fe51583 Compare January 31, 2021 21:15
@coveralls
Copy link

Coverage Status

Coverage increased (+5.1%) to 75.918% when pulling fe51583 on gnarf:extraneous-deps-test-case into 6f5c52c on benmosher:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+5.1%) to 75.918% when pulling fe51583 on gnarf:extraneous-deps-test-case into 6f5c52c on benmosher:master.

@ljharb ljharb merged commit fe51583 into import-js:master Jan 31, 2021
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.

4 participants