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
fix: use .js
and index.js
in imports
#974
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ehmicky
added
the
type: chore
work needed to keep the product and development running smoothly
label
Jan 28, 2022
ehmicky
force-pushed
the
chore/full-paths
branch
from
January 28, 2022 19:23
2ea1456
to
91e8f16
Compare
ehmicky
commented
Jan 28, 2022
.eslintrc.js
Outdated
@@ -2,11 +2,18 @@ const { overrides } = require('@netlify/eslint-config-node') | |||
|
|||
module.exports = { | |||
extends: '@netlify/eslint-config-node', | |||
rules: { | |||
'import/extensions': ['error', 'ignorePackages'], |
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.
Some new ESLint rules are needed with the new import patterns.
Closed
erezrokah
previously approved these changes
Feb 8, 2022
ehmicky
force-pushed
the
chore/full-paths
branch
2 times, most recently
from
February 8, 2022 17:54
af0d42b
to
8a11de4
Compare
erezrokah
previously approved these changes
Feb 8, 2022
This PR currently has a merge conflict. Please resolve this and then re-add the |
ehmicky
force-pushed
the
chore/full-paths
branch
from
February 8, 2022 18:20
2b2f1d2
to
6d844dc
Compare
ehmicky
force-pushed
the
chore/full-paths
branch
from
February 8, 2022 18:25
6d844dc
to
131f349
Compare
eduardoboucas
approved these changes
Feb 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #749
Pure ES modules require file extensions to be specified in file imports. In TypeScript, this is done by using
.js
, i.e. the path to the transpiled file, not to the source file (.ts
) (which might not seem intuitive).Also, pure ES modules require
index.js
imports to be explicit.This PR changes import file paths to match this.
For us to review and ship your PR efficiently, please perform the following steps:
🧑💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re
fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
passes our tests.