https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: b0ca4657ddf3766f1f7a938d858ab2ee27190df6 authored by JulienM on 19 January 2021, 19:52:36 UTC
Merge pull request #1187 from Inist-CNRS/version12.0.12
Tip revision: b0ca465
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