https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: ee39eb94cbc056c7c629a8a57e5866dca7a317f1 authored by François Parmentier on 16 May 2018, 13:29:02 UTC
8.20.2: Fix SPARQL Text encoding and LIMIT
Tip revision: ee39eb9
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