-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add allow
option to no-nodejs-modules
#452
Comments
Wouldn't be very hard to implement. But does this occur very often? If not, a eslint-disable comment could be the best option. |
I had the same initial gut reaction as @jfmengels, though that said I can imagine making a Also, I'd move to call the option Would be an easy PR for someone. @jfmengels do you think it hurts to have this? |
Just getting the feeling that for a lot of rules there are a lot of requests to have exceptions. It's a recurring theme. 👍 for |
Yeah, I am getting that feeling too, in general. This case is explicit, pragmatic, and obvious, though. I can imagine one could argue for an (linked because a quick web search found it to exist, by the law of npm that there is an npm package for every combination of two popular projects that support plugins, lol. 😎) |
exceptions
option to no-nodejs-modules
whitelist
option to no-nodejs-modules
Updated title to match discussion, @ljharb feel free to voice disagreement, just wanted to make sure possible PR submitters don't miss the discussion. |
I'd prefer a more neutral term that lacks the connotation of "whitelist". |
Fair enough. |
whitelist
option to no-nodejs-modules
allow
option to no-nodejs-modules
Sounds great! Fwiw, this isn't just for browserify, anyone who'd set up a custom alias for bundling, in webpacking as well, may still want this ability. |
This should allow by default anything in node-libs-browser It would be good to have presets for this, based on the table at https://github.com/webpack/node-libs-browser: hasImplementation: true (anything with a value for has implementation) |
@graingert certainly there should be an easy way to configure that, i.e. |
might should maybe not? I don't understand :( |
restatement: it's a breaking change not to ignore everything by default, but I think you're probably right in that in v2 it should default to allowing |
added the semver-major label so I remember to make an item to update the default behavior over in |
The
no-nodejs-modules
rule is very useful, but some modules are fine to import - likeevents
- due to a good browserify shim.I'd like the ability to add exceptions to this rule.
The text was updated successfully, but these errors were encountered: