https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: f1b6a7bf7f049580b02f0511b1d48d3afed34154 authored by François Parmentier on 20 July 2017, 15:45:34 UTC
:bookmark: 7.17.1: Convert http literal into URI
Tip revision: f1b6a7b
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