DEV Community


Posted on

My script to install husky, commitlint and lint-staged with zx

Hello friends,

In all my projects I use husky, lint-staged and commitlint.


I love husky ! It helps to create Git hook. I use it for :

  • run eslint with lint-staged before commit
  • commitlint to follow conventionnal commits rules
  • run unit tests before push


lint-staged is useful to run eslint against staged git files.
I love it, with lint-staged your commits contain nice files ;). It's better than one commit called lint all files after all commits ^^.


commitlint checks if your commit messages meet the conventionnal commit format.
I discovered conventionnal commit in my company and know I use it in any projects ;).

It's especially useful when we are many developers in a project. It's better than commit like job done, fix something etc ^^.


To install everything on my projects I create a zx script in my zx-scripts repository.

If you want test it, you can run this script withzx :

Enter fullscreen mode Exit fullscreen mode

If you don't have zx, you can install it with npm : npm i -g zx.

I'm still wording on it to add some args and eslint install.

Ciao friends !

Top comments (0)