Updated config and imports for module resolution#104
Updated config and imports for module resolution#104shalarewicz wants to merge 6 commits intodevfrom
Conversation
There was a problem hiding this comment.
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
evanmcneely
left a comment
There was a problem hiding this comment.
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