Skip to content
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

eslint in dependencies rather than dev-dependencies after eject #3209

Closed
James2516 opened this issue Sep 28, 2017 · 3 comments
Closed

eslint in dependencies rather than dev-dependencies after eject #3209

James2516 opened this issue Sep 28, 2017 · 3 comments

Comments

@James2516
Copy link

    "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?

@Timer
Copy link
Contributor

Timer commented Sep 28, 2017

See #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.

@Timer Timer closed this as completed Sep 28, 2017
@Timer
Copy link
Contributor

Timer commented Sep 28, 2017

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.

@ljharb
Copy link

ljharb commented Oct 14, 2017

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants