Skip to content

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.

3 participants