Revision 61b75a8bdf29314e54eba053c59c2efdd1b4a3ce authored by gildas on 06 March 2017, 15:37:39 UTC, committed by gildas on 06 March 2017, 15:37:39 UTC
1 parent cf10fe2
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
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...