#!/bin/sh STAGE_FILES=$(git diff --cached --name-only --diff-filter=ACM -- '*.ts' '*.tsx' '*.scss' "*.json") if test ${#STAGE_FILES} -gt 0 then cd frontend/ echo 'Frontend formatting' npm run format else echo 'No need to format' fi exit 0