Take the following Typescript arrow function:
/**
* Returns a probably unique component name.
*
* @param baseName a suggested name to make unique.
* @re
I don't have enough reputation to add this as a comment, but anyone that is getting an error similar to
./scripts/ts-staged-files.sh: line 4:
src/ui/Components/Select/Select.tsx: division by 0
(error token is "/Components/Select/Select.tsx")
I made this small modification to Matt McCutchen's answer to fix it.
#!/bin/bash
include_files=()
for f in "$@"; do
include_files+=("${f#$PWD/}")
done