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

Allow linting of typescript with module resolution set to node16 or nodenext #527

Merged
merged 1 commit into from May 24, 2023

Conversation

susnux
Copy link
Contributor

@susnux susnux commented May 17, 2023

Node16 module resolution with Typescript requires every relative import to have a file extension.
Typescript does not allow to use .ts and then rewriting it after compiling, so you have to use .js as the output.

As this file obviously does not exist on build time (as it needs to be created by Typescript), ESLint complains about an unresolved import. Fixing it by using a different resolver for this.

@susnux susnux requested a review from skjnldsv May 17, 2023 18:12
…6` or `nodenext`

Node16 module resolution with Typescript requires every relative import to have
a file extension, but Typescript does not allow `.ts` so you have to use `.js`.
As this file obviously does not exist on build time, but only after it has been created
ESLint will complain about an unresolved import. Fixing it by using a different resolver for this.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@skjnldsv skjnldsv merged commit 113fb6b into master May 24, 2023
4 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/typescript-node16 branch May 24, 2023 16:29
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

2 participants