commitizen / cz-cli

The commitizen command line utility. #BlackLivesMatter
http://commitizen.github.io/cz-cli/
MIT License
16.77k stars 552 forks source link

Lint-staged doesn't work with commitizen cli #911

Open Pranav016 opened 2 years ago

Pranav016 commented 2 years ago

I have hooks setup on my repository via husky and lint-staged which should run the linting and prettier commands automatically before commiting the code.

When I make a normal commit using git commit -m, lint-staged works but when commiting using commitizen cli, yarn cz (i have this script setup in package.json)

 "scripts": {
    "commit": "cz"
  }

Lint-stage doesn't run/ doesn't automatically format the code before the commit. Any work-around for this?

hesetiema commented 1 year ago

same issue. 😪😫😌

hesetiema commented 1 year ago

I tried "commit": "lint-staged && cz". that works for me.