Easily add a Git pre-commit hook to your Node.js project.
npm install pro-commit> Easily add a Git pre-commit hook to your Node.js project.


``sh`
npm install --save-dev pro-commit
`sh`
npm uninstall --save-dev pro-commitchange this if the project has a custom Git hooks path
rm .git/hooks/pre-commit
Add prepare and pro-commit:task to scripts in package.json:
`json`
{
"scripts": {
"prepare": "pro-commit",
"pro-commit:task": "..."
}
}
Run install to ensure that the prepare lifecycle script sets up a Git pre-commit hook:
`sh``
npm install