Open
Description
Steps to Reproduce
npm install --save-dev @commitlint/config-conventional @commitlint/cli
echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
npm install --save-dev husky
npx husky init
echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg
npx commitlint --from HEAD~1 --to HEAD --verbose
git commit -m "foo: this will fail"
Failure - Expected
git commit -m "chore: lint on commitmsg"
Success - Expce
Current Behavior
- First step: Local setup is done for the repo called "devops" by following the official document
https://commitlint.js.org/guides/local-setup.html.
Hook is working fine within the local cloned working directory called "devops"
Success: It blocks the commits as the message doesn't consist of type - Expected
- Second Step: All the code changes like npm nodemodules, husky were pushed to the remote orgin. In other directory - tried cloning the same repo "devops" with all commit lint configs.
Failure: It doesn't block the commit message though the conventional type is missing.
- Third Test: Direct commit in Visual studio without the type - Failure
- Firth Test: Direct commit in azure repo without the type in mesaage - Failure
Expected Behavior
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
No response
Context
No response
commitlint --version
@commitlint/cli@19.6.0
git --version
git version 2.47.1.windows.1
node --version
10.9.0