You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Configuration for lefthook tool to manage git hooks
# https://github.com/evilmartians/lefthook
# Commands to run before committing code.
pre-commit:
commands:
lint:
# Format code and then `git add` modified files from formatter.
run: task format && git add {staged_files}
# Commands to run before pushing code
pre-push:
commands:
lint:
# Run linter giving you errors to fix.
# By using `|| echo "..."`, we do not block you from pushing code. Running lint in a git hooks is to warn you about lint errors early, but not block you from pushing code with errors if you decide to push.
run: task lint || echo -e "\n\n ⚠️ Linting contains errors that will prevent you from merging a pull request. Fix errors above if you are planning on making a pull request."