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

chore: explicitly mark imports/exports that are only used as types #818

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

wolfy1339
Copy link
Member


Behavior

Before the change?

  • Some compilers that don't fully parse typescript, ex: Babel and esbuild, would include these imports/exports in the build output

After the change?

  • With the explicit markers, those imports/exports aren't included in the build output

Other information


Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

This helps with compilers that don't do full typescript parsing, ex: babel and esbuild
@wolfy1339 wolfy1339 added the Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR label Mar 6, 2023
@wolfy1339 wolfy1339 enabled auto-merge (squash) March 6, 2023 01:54
@wolfy1339 wolfy1339 merged commit 7fb151d into main Mar 6, 2023
@wolfy1339 wolfy1339 deleted the explicit-type-import/exports branch March 6, 2023 01:55
@oscard0m
Copy link
Member

oscard0m commented Mar 7, 2023

@wolfy1339
Copy link
Member Author

It would be nice, but i don't think introducing another linter is the best idea

@oscard0m
Copy link
Member

oscard0m commented Mar 7, 2023

It would be nice, but i don't think introducing another linter is the best idea

Some extra step in test.yml maybe? Still creates friction to contributors, right?

@wolfy1339
Copy link
Member Author

If it were a plugin for prettier, it would work just fine. Introducing eslint into the mix is probably not the best call.

For now, it will just have to be something to watch out for

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2023

🎉 This PR is included in version 10.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This PR is included in version 11.0.0-beta.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @beta released on @next Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants