cz-cli icon indicating copy to clipboard operation
cz-cli copied to clipboard

Lint-staged doesn't work with commitizen cli

Open Pranav016 opened this issue 2 years ago • 2 comments

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?

Pranav016 avatar Mar 16 '22 11:03 Pranav016

same issue. 😪😫😌

hesetiema avatar Oct 21 '22 10:10 hesetiema

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

hesetiema avatar Oct 24 '22 01:10 hesetiema