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

refactor(useExportType): don't report export {} #3542

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

Conaclos
Copy link
Member

Summary

Close #3535

An empty export {} allows you to force TypeScript to consider a file with no imports and exports as an EcmaScript module.
While export type {} is valid, it is more common to use export {}.
Users may find it confusing that the linter asks them to convert it to export type {}.
Also, a bundler should be able to remove export {} as well as export type {}.
So it is not so useful to report export {}.

Test Plan

I updated the tests.

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels Jul 29, 2024
@Conaclos Conaclos force-pushed the conaclos/useExportType-empty-export branch from eb2ee5a to 1b15581 Compare July 29, 2024 09:39
Copy link

codspeed-hq bot commented Jul 29, 2024

CodSpeed Performance Report

Merging #3542 will not alter performance

Comparing conaclos/useExportType-empty-export (1b15581) with main (5d8a31e)

Summary

✅ 104 untouched benchmarks

@Conaclos Conaclos merged commit 6be2bdd into main Jul 29, 2024
15 checks passed
@Conaclos Conaclos deleted the conaclos/useExportType-empty-export branch July 29, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Linter Area: linter L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 False positive of useExportType for export {}
2 participants