"eslint": "4.4.1",
"eslint-config-react-app": "^2.0.1",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.1.0",
Why are these eslint packages in dependencies instead of dev-dependencies after eject? Wouldn't that make the production build size unnecessarily bigger?
See https://github.com/facebookincubator/create-react-app/issues/2696 for context -- basically there's no correct answer to the argument.
In our opinion, it's nothing to be dogmatic about; if you want to get technical, 100% of your dependencies should be devDependencies, because we produce static files for consumption in production.
Wouldn't that make the production build size unnecessarily bigger?
No, dependencies
are not included in your production build unless explicitly imported by your application.
@Timer there's definitely a correct answer, and the technicality of bundling doesn't alter it. Things that are used at runtime - even if via a bundling process - are dependencies, and things that are used to develop the package/app/module, are devDependencies.
Every eslint thing should always be a devDependency; there's literally no reason beyond pedantry to argue otherwise.
Most helpful comment
@Timer there's definitely a correct answer, and the technicality of bundling doesn't alter it. Things that are used at runtime - even if via a bundling process - are dependencies, and things that are used to develop the package/app/module, are devDependencies.
Every eslint thing should always be a devDependency; there's literally no reason beyond pedantry to argue otherwise.