https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: 27e7bf9ffccbe92eb0403cf609e8a5ae7ea86f0c authored by ThieryMichel on 27 September 2018, 07:26:34 UTC
Merge pull request #703 from Inist-CNRS/fix-docker-image-build
Tip revision: 27e7bf9
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
back to top