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

Forbid wildcard exports #331

Open
mcmire opened this issue Oct 26, 2023 · 1 comment
Open

Forbid wildcard exports #331

mcmire opened this issue Oct 26, 2023 · 1 comment

Comments

@mcmire
Copy link
Contributor

mcmire commented Oct 26, 2023

When developing and maintaining a package, it is critical to understand what modules are being exported. There are a couple ways to do this. One way is to add a test for the entry point, like for utils. Another, more obvious way is to be explicit about which modules are being exported in the entrypoint. Currently we allow wildcard exports. I am proposing we stop doing this and instead prefer named exports.

No ESLint rule exists per se to forbid wildcard exports, but evidently you can use no-restricted-syntax as a workaround as described here: import-js/eslint-plugin-import#2493 (comment)

@mcmire
Copy link
Contributor Author

mcmire commented Feb 8, 2024

We should implement this in core first before adding it to this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant