-
-
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
Rule proposal: no-core #158
Comments
Ooo, interesting. Seems to be a similar rule to #126, maybe a |
need #126 first, to avoid rework, I think. thus the |
Pretty easy to add, I don't mind adding it. Most of the code needed has been written in eslint-plugin-import-order https://github.com/jfmengels/eslint-plugin-import-order/blob/master/utils.js#L12-L14. It's similar to #126 but doesn't need to have IO since the list of builtin modules is known (and pretty stable too I think). |
@jfmengels works for me! FWIW the resolvers return Only benefit is that substack/resolve is responsible for maintaining the list. (assuming that's how it's implemented, I haven't looked closely at So fine to start there, at least. I think I'd probably like to ultimately use the resolvers for consistency, but that's just an implementation detail, and I think it can be amended later as a non-breaking change. |
I have seen client app code import Node.js modules, e.g.
This will potentially import a huge library that will vary depending on the node version used to build the bundle. Bundle should not depend on the version of node used to build it.
This is hard to catch because it will just work until it suddenly stops with no way to traceback the issue in the code itself.
The rule should restrict
import
to only modules declared inpackage.json
(or another strategy used to make sure that Node.js modules are not imported).The text was updated successfully, but these errors were encountered: