-
-
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
no-unresolved
rule should not report for optionalDependencies
#812
Comments
they're "optional" in that the overarching install won't fail if their installation fails; that's not the same thing as optional.
In the linked use case, certainly the "windows.js" entry point might be optionally required, but unless the dependency is present, it'd fail at runtime. The only thing I can think of that might possibly make sense here is an explicit option to skip optionalDependencies, or, an explicit "exceptions" array - but in general I think that conditional requires and optional deps run counter to the purpose of the rule. |
The point is that if I put a dependency in |
I have a Jest test file that uses the redux-mock-store package, which gets installed with |
Imported packages that are defined in
optionalDependencies
in package.json are optional and should not cause a violation.The text was updated successfully, but these errors were encountered: