https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: 6c159ee057a14a4974f75b88c19ab4bf55a553d5 authored by François Parmentier on 16 May 2018, 12:14:30 UTC
8.20.1: Fix docker build
Tip revision: 6c159ee
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