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

Reproduce baseUrl + .js extension with .ts source #19

Closed
wants to merge 1 commit into from
Closed

Reproduce baseUrl + .js extension with .ts source #19

wants to merge 1 commit into from

Conversation

JounQin
Copy link
Contributor

@JounQin JounQin commented Jun 25, 2022

No description provided.

@JounQin
Copy link
Contributor Author

JounQin commented Jun 25, 2022

Besides, .cjs should try .cts, and .mjs should try .mts also.

.d.ts, .d.cts and .d.mts.

@JounQin
Copy link
Contributor Author

JounQin commented Jun 25, 2022

if (isRelativePathPattern.test(specifier)) {
return [];
}

And why relative paths are always ignored? I'm not quite sure to understand.

@JounQin
Copy link
Contributor Author

JounQin commented Jun 25, 2022

./foo should also try foo/index.ts, ./foo.js should also try foo.js/index.ts 😂

For more test cases, please see https://github.com/alexgorbatchev/eslint-import-resolver-typescript/blob/master/tests/withJsExtension/test.js

JounQin added a commit to import-js/eslint-import-resolver-typescript that referenced this pull request Jun 25, 2022
JounQin added a commit to import-js/eslint-import-resolver-typescript that referenced this pull request Jun 25, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant