https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: 312560efea17434fe16f3f8318059523cb928a70 authored by François Parmentier on 14 June 2017, 14:52:37 UTC
:bookmark: 7.16.0: Add DEFAULT transformer & Improve filter
Tip revision: 312560e
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