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

Adding .js extension to import of .ts file results in error #2308

Closed
richardkazuomiller opened this issue Nov 22, 2021 · 1 comment
Closed

Comments

@richardkazuomiller
Copy link

richardkazuomiller commented Nov 22, 2021

In order to build ESModules with TypeScript, we need to import our .ts files with a .js extension, like ./path/to/file.js. If I enable eslint-plugin-import, it throws the error Missing file extension "ts" for "./path/to/file.js" import/extensions. How do I configure eslint-plugin-import to allow me to import files the way they need to be imported in order to export valid ESM?

@ljharb
Copy link
Member

ljharb commented Nov 22, 2021

Duplicate of #2170.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants