https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: 0875324a9cb5757227f0f429e90c071af7397bfb authored by Adrien Amoros on 14 November 2019, 15:06:08 UTC
Merge pull request #1000 from Inist-CNRS/releases/v11.3.1
Tip revision: 0875324
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