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

Install husky, lint-staged, and prettier to dev deps #4994

Closed

Conversation

dankreiger
Copy link

  • A small fix

I really like using husky, lint-staged, and prettier with create-react-app.

I don't see why they should be included in the production bundle though, so I just updated the docs accordingly to make sure people install them as dev dependencies.

@rovansteen
Copy link
Contributor

Unless you somehow require them in your source files they won’t end up in the production bundle though.

@dankreiger
Copy link
Author

dankreiger commented Sep 10, 2018

@rovansteen I see. If nothing else it makes sure package.json remains organized. Should I close this then?

The only other thing I'd say is that the official docs from all 3 of these dependencies instruct us to use npm install --save-dev or yarn add --dev

https://github.com/typicode/husky#install
https://github.com/okonet/lint-staged#installation-and-setup
https://prettier.io/docs/en/install.html

@stramel
Copy link

stramel commented Sep 11, 2018

A nice benefit of them being in the devDeps is that using a production install command won't waste time installing them. It can help keep docker images smaller.

@bugzpodder
Copy link

@dankreiger thanks for the PR. Please see #3209 on reasons on why the docs doesn't suggest dev dependencies.

@bugzpodder bugzpodder closed this Sep 11, 2018
@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants