-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
no-hide-core-modules is based on an invalid assumption #69
Comments
Thank you for this issue. Oops, I had completely misunderstood.... 😢 |
No problem 👍 We will be including this plugin in the next version of |
I do follow the reasoning here and it seems valid. I just want to add that this rule has caught someone in our dev team that did |
You stated in #66 that:
The behavior is actually the opposite. If you do
npm install buffer
andrequire('buffer')
you get the core buffer module.The only way to get the npm-installed version is with
require('buffer/')
. Although this looks hacky, the way thatrequire
works is locked, so this behavior won't ever change.Not sure what you want to do with the rule now. It should probably be removed, since doing
require('util')
isn't dangerous, and it's not the user's fault if one of their dependencies doesrequire('util/')
in my opinion.The text was updated successfully, but these errors were encountered: