https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: 3a8ba66da413c4e7478547122c85e01f57ccc7ab authored by ThieryMichel on 20 September 2018, 11:48:45 UTC
Merge pull request #693 from Inist-CNRS/fix-resource-field-sort-drag-and-drop
Tip revision: 3a8ba66
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