Revision 89da28dad15e98cfb4376931bb04c7b1b91c30f9 authored by ThieryMichel on 28 February 2017, 08:15:09 UTC, committed by ThieryMichel on 28 February 2017, 08:15:09 UTC
1 parent 15bf85e
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 ...