Skip to content
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

2404: Convert tools to ESM #2502

Merged
merged 4 commits into from
Oct 10, 2023
Merged

2404: Convert tools to ESM #2502

merged 4 commits into from
Oct 10, 2023

Conversation

sarahsporck
Copy link
Contributor

Short description

This PR displays in a small scope how the conversion to esm could look like. Feel free to ask questions and make remarks if you are unhappy.

Proposed changes

  • added linting rules relevant for esm
  • added file extensions to import
  • set type to 'module'
  • update node-fetch to show that other esm packages work fine now :)

Resolved issues

Partially addresses: #2404


@sarahsporck sarahsporck linked an issue Oct 5, 2023 that may be closed by this pull request
@sarahsporck sarahsporck mentioned this pull request Oct 5, 2023
@sarahsporck sarahsporck removed a link to an issue Oct 5, 2023
@sarahsporck sarahsporck changed the title 2404: convert tools to esm 2404: Convert tools to ESM Oct 5, 2023
.eslintrc.js Show resolved Hide resolved
tools/git-version.ts Show resolved Hide resolved
@LeandraH
Copy link
Contributor

LeandraH commented Oct 9, 2023

Do you have extensions that do the updated importing automatically for us? I foresee a lot of wrong imports in the future...

@sarahsporck
Copy link
Contributor Author

Do you have extensions that do the updated importing automatically for us? I foresee a lot of wrong imports in the future...

I added a eslint-plugin that checks that. Also, if you have set "type": "module" in the package.json this should done automatically by your IDE

@sarahsporck sarahsporck merged commit 8ddc4c2 into main Oct 10, 2023
4 checks passed
@sarahsporck sarahsporck deleted the 2404-convert-to-esm branch October 10, 2023 14:27
@sarahsporck sarahsporck restored the 2404-convert-to-esm branch October 16, 2023 07:32
@sarahsporck sarahsporck deleted the 2404-convert-to-esm branch October 16, 2023 07:33
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