Migrate some dependencies in devDependencies for gatsby package.
At least these (non exhaustive):
yarn install --production
npm install --production
No dev packages should be installed.
Load linting dependencies and others
All.
"eslint"
"eslint-config-react-app"
"eslint-loader"
"eslint-plugin-graphql"
"eslint-plugin-import"
"eslint-plugin-jsx-a11y"
"eslint-plugin-react"
"eslint-plugin-react-hooks"
These are correctly set to dependencies because they're used when running gatsby develop (Gatsby lints your site's code)
"eslint-plugin-flowtype"
"@typescript-eslint/eslint-plugin"
"@typescript-eslint/parser"
These on the other hand _are_ indeed devDependencies and could be moved there.
I can take this.
Flow and TypeScript packages should even be optionalDependencies.
Hmm, after some thinking I just realised that these shouldn't be dependencies of gatsby but in our monorepo root package.json since they're used when developing gatsby (and not a gatsby site)
Flow and TypeScript packages should even be optionalDependencies.
Hmm, after some thinking I just realised that these shouldn't be dependencies of
gatsbybut in our monorepo rootpackage.jsonsince they're used when developing gatsby (and not a gatsby site)
Just to make sure I understand, I can remove all dependencies related to typescript and flow from /packages/gatsby?
So for example, I can ditch eslint-plugin-flowtype.
@sidharthachatterjee @pieh I'm following up because I'm losing the thread a bit here between the issue and the PR.
Would one of you let me know what you'd like?
cc @sidharthachatterjee @pieh
Can't remove those deps or move to dev deps because of https://github.com/gatsbyjs/gatsby/issues/20815#issuecomment-577703587 - the additional 3 deps there are peer deps of eslint-config-react-app so they also need to stay
Most helpful comment
I can take this.