When developing and maintaining a package, it is critical to understand what modules are being exported.
There are a couple ways to do this:
- Add a test for the entrypoint of the package (
index.ts), like for utils.
- Be explicit about which modules are being exported in the entrypoint.
I am proposing that we follow the second route as it is simpler. This would mean banning wildcard 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)
When developing and maintaining a package, it is critical to understand what modules are being exported.
There are a couple ways to do this:
index.ts), like forutils.I am proposing that we follow the second route as it is simpler. This would mean banning wildcard exports.
No ESLint rule exists per se to forbid wildcard exports, but evidently you can use
no-restricted-syntaxas a workaround as described here: import-js/eslint-plugin-import#2493 (comment)