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

Resolve .ts files as well as .js files #88

Merged
merged 1 commit into from Feb 19, 2020
Merged

Conversation

koddsson
Copy link
Contributor

When you have a .ts file such as button.ts and try to import it without it's file extension, the current config will error with the message:

app.js
1:1 import/no-unresolved  (https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md)
	Unable to resolve path to module './button'.


✖ 1 problem (1 error, 0 warnings)

It's because by default the import plugin will only look for .js files.

This PR passes an array of file extensions for the import plugin to consider as settings in the es6 config.

Ref: https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importextensions

@koddsson koddsson requested a review from a team February 18, 2020 13:07
@koddsson koddsson merged commit 7c616ef into master Feb 19, 2020
@koddsson koddsson deleted the import-resolver-ts branch February 19, 2020 09:51
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