#!/bin/bash CHANGED_FILES=`git diff origin/master...HEAD --name-only` node_modules/eslint/bin/eslint.js -f json $CHANGED_FILES --quiet | node_modules/eslines/index.js --quiet if [[ $? != 0 ]] ; then echo "Fix style violations" exit 1 fi echo "All changed files are good"