https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: c4209352642f62dfad6de64e043a40f6ea35ba5a authored by François Parmentier on 01 August 2017, 07:34:54 UTC
:bookmark: 7.18.0: Export composed fields and add transformers
Tip revision: c420935
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