Add missing import extension, check with lint #4795
Merged
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.
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.
This is a build regression from #4778. I can file an issue if you really want me to.
Description
Some pure-ESM processors (eg,
tsc
with `moduleResolution: 'nodenext') require extensions on all imports. #4778 added two import-less extensions. This PR fixes them and adds linting (from an already-installed plugin) to catch future errors. Test execution does not appear to require these extensions so we only check non-test files (there's another 17 errors to fix if you want to check tests too).While this requirement isn't documented anywhere I found quickly, I have to assume it's intentional (since #4539) because every other import uses it.
Type of change
Please delete options that are not relevant.
Screenshots/Sandbox (if appropriate/relevant):
n/a
How Has This Been Tested?
#4778 (specifically,
@graphql-tools/[email protected]
broke a build in my project.The breakage pointed directly at these two lines.
The lint rule I added also found only these two lines. So I fixed them. I have not yet actually verified that the built package fixes my original problem, but it sure seems likely.
Checklist:
Further comments
Pretty simple I hope.