-
-
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 ability to ignore certain packages from all rules #275
Comments
What loads modules in an Electron project? I.E. does it have its own Browserify- or Webpack-like bundler? or is it just a special Node process and I can imagine solving this with either
or
An |
Electron embeds Node.js and injects the
Probably not. Electron only has one export =>
Yeah, that would work, although I'd argue |
Actually, maybe an The existing builtins could be sensitive to |
Is there a way to specify a list of built-ins for Electron's sake? |
@rgbkrk: not yet. I was thinking to add I'll take a look soon, can probably do something simple. |
Any simple workaround for this issue? |
@andreieftimie and others looking for a temporary workaround, I solved this by creating an additional fake "node_modules" with the package I want to ignore (in this case, Here is the relevant change: radiant-player/radiant-player-electron@9935f8f |
@jacobwgillespie that seems better than my solution, which was to completely disable the rule
|
There is always |
Published with v1.10.0, see |
It is great to have this ignore certain external module feature, but I am having a slightly different use case: I have a symlink [edit] I think also if you don't like my use case, the same issue is present if I want to import something like |
@sjungwirth: you've got an interesting point. However, the node resolver's paths setting might be a better answer for your case: https://github.com/substack/node-resolve/blob/master/readme.markdown The node resolver takes the same options as the node-resolve package: https://www.npmjs.com/package/eslint-import-resolver-node |
Electron exposes an
const electron = require('electron');
import, but it's not listed anywhere, as it's more of an additional built-in. Same goes foratom
, when creating Atom plugins.I think we could just ignore these by default as no one would want it to be linted, but there also might be other cases of this, so would still be useful to have an ignore option.
Here's the errors I get when running this plugin on an Electron project:
Example import: https://github.com/sindresorhus/caprine/blob/2acdd358eafdc42b45b532c90e87ba5465a30de7/index.js#L4
The text was updated successfully, but these errors were encountered: