-
-
Notifications
You must be signed in to change notification settings - Fork 2
Updated config and imports for module resolution #104
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
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an .eslintrc
file in the test directory with the "import/extensions"
rule set to off
. This will ignore the rule in that directory (source). Also, the .npmignore
file will need to be updated/cleaned-up since there is no src
folder in dist
anymore. We can also get rid of the add-file-extension
dependency and maybe update the .travis.yml
for deployment.
I also noticed that the import/extension
rule is prompting me to add .ts
file extension when we want .js
file extension. Minor but could be confusing to others down the line.
I can do some of this if you want. Otherwise nice config fixes for an annoying issue.
file extensions are not required in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. For the record, I've run npm publish --dry-run
to verify the correct file structure gets published.
Summary
This PR updates imports to support ESModules per the typescript docs.
Adds linting rules to enforce the addition of file extensions to import statements.
Updates jest config to support module resolution during testing.
Type of Change
Please delete options that are not relevant.
Issues
Evidence