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

[@kadena-dev/eslint-config] Enforce restriction on individual file imports when an index file is present #180

Open
eileenmguo opened this issue Feb 28, 2023 · 1 comment

Comments

@eileenmguo
Copy link
Contributor

eileenmguo commented Feb 28, 2023

Is your feature request related to a problem? Please describe.
When providing an index file to expose a public API for the contents of a directory, users are still able to import items from the index file and from any of the files within the directory. This allows users to export and use private items that are only intended to be used within the parent directory elsewhere.

Describe the solution you'd like
Restrict the export of items from a directory if an index (barrel) file is present

Describe alternatives you've considered
-

Additional context
Similar to this, however we would want the restriction to be applied depending on the existence of the index.ts file
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-internal-modules.md

@github-actions
Copy link
Contributor

This issue is stale because it is open for 60 days with no activity

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