Currently we just lint, but we would benefit from doing what I have in my pre-commit script:
set -e
# check typescript correctness
npx tsc --noEmit
# check all .sh files are executable
invalid_scripts=0
for script in $( find . -type f -iname *.sh ); do
if [ ! -x $script ]; then
echo "Script $script is not executable"
invalid_scripts=$((invalid_scripts + 1))
fi
done
if [ $invalid_scripts != 0 ]; then
exit 1
fi
# check there are no it.only occurrences in the tests
grep -re "it\.only(" $(git ls-files '*.ts') && echo "Error: There are files with it.only(...)" && exit 2
# lint
npm run lint
Currently we just lint, but we would benefit from doing what I have in my pre-commit script: