https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: 98757012f76f9954e2aedd379d9fc83d58212ead authored by François Parmentier on 11 June 2019, 14:02:52 UTC
:bookmark: 9.8.2: Use external scripts for exporters
Tip revision: 9875701
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