Skip to content

Conversation

@rperello
Copy link

@rperello rperello commented Jul 6, 2021

Closes #2145

@ljharb ljharb force-pushed the origin/fix-is-scoped branch from cc1d442 to 00d7bc8 Compare August 3, 2021 19:58
@ljharb ljharb changed the title [extensions]/importType: fix isScoped treating @/abc as scoped module [Fix] extensions/importType: fix isScoped treating @/abc as scoped module Aug 3, 2021
@ljharb ljharb merged commit 00d7bc8 into import-js:master Aug 4, 2021
@ykzts
Copy link

ykzts commented Oct 7, 2021

@ljharb With this change, @/pages (used in Next.js and Nuxt.js), which used to be treated as internal, is now recognized as unknown. Is it intentional that such a disruptive change is included in a minor version upgrade?

@ljharb
Copy link
Member

ljharb commented Oct 7, 2021

Yes, because it was a bug that it was treated as a valid package name in the first place. You can configure it with an import resolver.

@ykzts
Copy link

ykzts commented Oct 7, 2021

Hmm. import/order asks for the import type by value without resolver, so values like @/pages are always unknown. Is this not fixed in the eslint-plugin-import spec?

@ljharb
Copy link
Member

ljharb commented Oct 7, 2021

You’re right, that seems like a bug in the order rule - it should probably use the resolver to get the type. Can you file a new issue for that?

@ykzts
Copy link

ykzts commented Oct 7, 2021

Thank you very much. I created #2249.

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.

Set @/whatever import path as not scoped package

4 participants