Closed blackxored closed 7 years ago
While global installation certainly is possible and something I want to support as a feature I do not endorse it and don't want to point more users to it.
The reasons for this are mainly:
package.json
vs. global) and what config is in effect. This is especially true as commitlint
has no "prefer local" mechanics yet.~/commitlint.config.js
(you might have forgotten about) changes default behaviour and creates misunderstandings@commitlint/prompt-cli
=> @commitlint/prompt
. This tends to create differences between dev machines that are hard to reproduce@marionebl, it's strange. I haven't seen npm packages that cannot be installed globally.
node_modules
, package.json
, package-lock.json
β can create additional difficulties for developer.Users might be unable to report what version they are actually using (package.json vs. global) and what config is in effect.
commitlint --version
β global,npx commitlint --version
β per project.Global config changes default behavior: From a user perspective ~/commitlint.config.js (you might have forgotten about) changes default behavior and creates misunderstandings
If local configuration file exists:
β β β β local accept, global file ignore.
else local file no exists, global exists:
β β β β global configuration accept.
Global installation makes all dependencies of the globally installed packages available
Thanks.
With the new
config-conventional
I thought it was time to switch from my global cz-conventional-changelog to this. It would be nice if it would be documented how to do this globally.Here's roughly what I did: