https://github.com/Inist-CNRS/lodex
Raw File
Tip revision: c3f5752c6c0c97cd98d5d96757502906d6a258f5 authored by Anthony Rimet on 23 October 2023, 13:35:31 UTC
14.0.16-alpha
Tip revision: c3f5752
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