commitizen / commitizen/cz-cli

husky doesn't cause issues with script named commit

Open
#684 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17.5k
Forks
566
Avg merge
8h 16m
Merged PRs (30d)
1

Description

This section from the README doesn't seem valid anymore. I've been using a script called `"commit"` with a husky `"precommit"` hook without any issues.

Unless I'm missing something this can be removed.

```
NOTE: if you are using precommit hooks thanks to something like husky, you will need to name your script some thing other than "commit" (e.g. "cm": "git-cz"). The reason is because npm-scripts has a "feature" where it automatically runs scripts with the name prexxx where xxx is the name of another script. In essence, npm and husky will run "precommit" scripts twice if you name the script "commit," and the work around is to prevent the npm-triggered precommit script.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.