CLI script for linting your commit message π
Clone the repo
git clone git@github.com:WenLonG12345/commit-script.git
Open the repo and install packages
npm i
npm i zx -g
Test to run the script
zx commit.js
Then add the command to your environment variables.
- If you are using macOS (zsh), you can add the code below to
zshrc
:
## open zshrc
code ~/.zshrc
## add this function to zshrc
cm () { ## cm can be renamed to any name you want
zx /Users/teowenlong/commit-scripts/commit.js ## path to commit.js
}
- If you are using Powershell, please refer to zx-script
All the credit goes to zx-scripts. Since the author only showcase for Powershell, hence I clone the repo and make it suitable for my usecase, and showcase for MacOS usage.