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

Conflicting linting rules for typescript import #684

Closed
acalvino4 opened this issue Aug 27, 2022 · 1 comment
Closed

Conflicting linting rules for typescript import #684

acalvino4 opened this issue Aug 27, 2022 · 1 comment

Comments

@acalvino4
Copy link

Observe the following linter violation:
image

All good - but when I add the .ts extension to the import, I get a new error:
image

If I give the import a .js extension, it works, but this seems strange, given that the file name actually has a .ts extension

@sindresorhus
Copy link
Member

The import/extensions error message is incorrect. .js is what you must use: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#esm-nodejs

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

No branches or pull requests

2 participants