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

🐛 Bug (eslint-plugin): [no-dual-exports] Don't report on type exports #919

Open
JoshuaKGoldberg opened this issue Jan 10, 2025 · 0 comments

Comments

@JoshuaKGoldberg
Copy link

Coming over from readmeio/remove-undefined-objects#128 (comment): when a file has:

  • A default export of a value, such as export default function stripEmptyObjects() { }
  • A named export of a type, such as export interface RemovalOptions { }

...should the readme/no-dual-exports rule still trigger?

The rule's description mentions it reports on the dual exports to help with CJS resolution. But is that just at runtime? Are there type-level reasons not to? I'm not aware of any.

Proposal: can the rule be made to ignore exports that are only in type-land (interface, type)?

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

No branches or pull requests

1 participant