Closed
Description
Currently, we are using lint-staged
to run linter on staged files but we are lacking documentation to add lint-staged
on the pre-commit
hook.
We can add a code snippet in the wiki that can help contributors/devs to set up the pre-commit
hook something like this:
echo "set -e; composer run-script pre-commit" > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
One more thought came up to my mind. What if the user is on Windows OS?
Should we add husky to overcome this issue? We can add a pre-commit
hook using husky on the prepare
script. So when the user runs npm install
, husky will add a pre-commit
hook.