Get rid off Syntax fix commits enabling your linter everytime a git commit try to be done.
This example features local eslint with js and jsx validation
Enable this hook creating or modifying the file /your/project/path/.git/hooks/pre-commit
#!/bin/sh
# Ensure all javascript files staged for commit pass standard code style
ROOT_DIR=$(git rev-parse --show-toplevel)
LINT="${ROOT_DIR}/node_modules/eslint/bin/eslint.js --ext .js --ext .jsx"
git diff --name-only --cached --relative | grep '\.jsx\?$' | xargs node $LINT
if [ $? -ne 0 ]; then exit 1; fi
Based on StandardJS