-
Notifications
You must be signed in to change notification settings - Fork 30
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
Suggestion - suggest npm ci instead of npm install #37
Comments
As far as I understand, |
@mgol Thanks for your quick response. This is not quite true. We use npm ci to ensure that the packages we install comply with package.lock.json. And we do this locally. The impact of running npm install is that it will change your package.lock.json and therefore you do not get the benefit of its protection. We advise all our developers to run npm ci instead of npm install for this reason. |
BTW happy to submit a PR for this if you agree with it |
I'm fine with this being an option, I think PRs are welcome! |
@mgol great, please expect a PR forthwith. May I suggest that the packageInstallCommand default to "npm install" then you could have the option of changing it to "yarn install" or "pnmp install" or one of the many other npm alternatives. |
@jackgeek There's already the BTW, currently only npm & bower are officially supported (see the README). I think adding support for more should be doable, in many places there's logic that checks whether |
Hi @mgol, This is taking me longer than I anticipated due to eslint and formatting rules. Do you use an auto formatter? Is there one I can use to get the style for your project? If not have you considered using prettier? This is what I use for my projects and it is excellent. |
Yeah, I’d use Prettier if was setting up the repo now. I’m fine with a PR that introduces it but I think you’d first need a PR to my eslint-config-mgol to remove all formatting rules from the config. I have a check there that all defined rules are either explicitly enabled or disabled so those rules need to be set to disabled. |
@jackgeek I went ahead & updated |
For teams using package.lock.json advising the user to use
npm install
is not good advice. WOuld it be possible to add configuration to allow it do advise runningnpm ci
instead?The text was updated successfully, but these errors were encountered: