-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Consider using peerDependencies for including react, prop-types, etc. #1990
Comments
Things also become inconsistent when using |
This would be great for cleaning up incorrect "unmet peer dependency" warnings. Also, it seems inline with the approach taken in the recent Gatsby breaking changes for Styled Components and React Helmet. |
I can take this on if it's up for grabs from non-Contributors! |
I'm trying to discern the desired workflow here Let's say you're using Would you like the documentation to say that to install you should run I believe (I'd be thrilled to be mistaken on this) that we need to specify the version of the peer dependency that we're installing in order to keep things in sync – I don't believe there's manually resolution where it's like hey cool there's a peer dep in this first thing so let's just grab that version of this second thing Can we/do we want to handle this automatically in a post install? Do we want to handle this like eslint-config-airbnb and provide a guide for getting the version numbers? Do we want to use https://github.com/emdaer/emdaer (shameless self-promotion) to keep the peer dep versions up to date in the README install steps by pulling them from Or am I missing another even better option? |
@flipactual check out the plugins we've already converted like styled-components and emotion — https://www.gatsbyjs.org/packages/gatsby-plugin-styled-components/ We just tell people to install both the plugin and the actual package. I think it's fine to tell people just to install the latest version of the peerDependency — yeah there's the risk of there being a major release which breaks things but that's rare and quickly fixable generally. Generally speaking I dislike extra process and work unless it's proven it's needed. |
Cool cool cool What all from |
Just
|
I think this is done now for v2! |
Should Webpack be listed as a peer dep? Working on an existing project using Gatsby, and seeing that webpack is available in gatsby-node, although it's not in the projects devDeps. |
Sorry to bring this up again, I'm still having this issue with the package Should i just get rid of it using (Maybe this is an issue with the starter itself?) EDIT: Seems like it was a bug with the default starter, it's reported here: https://github.com/gatsbyjs/gatsby-starter-default/issues/94 Sorry for the unnecessary noise. |
Using ESLint along with Gatsby, I encountered several violations of the ESLint rule
import/no-extraneous-dependencies
. As a workaround, @ahfarmer has once suggested to use the ESLint config snippet below:Personally, I find it misleading that some source-bound packages are not listed in
package.json
, and would like to suggest requiring packages similar toreact
by specifying them aspeerDependencies
of their corresponding Gatsby plugins.The text was updated successfully, but these errors were encountered: