tsc-files
tsc-files copied to clipboard
.tsbuildinfo file is not deleted automatically
Hello!
Problem
After running tsc-files
command I have temporary .tsbuildinfo file (for example, tsconfig.d5ixp4o4o2.tsbuildinfo)
Possible solution
Delete .tsbuildinfo file automatically
PR #40
I have the same problem. Thanks for the PR @DmitryBerdnikov
Unfortunately looks like the project's abandoned.
A workaround for this issue with lint-staged and husky is to write your own cleanup in .husky/pre-commit
. This works for me for both error and success cases:
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"
# Swallow error temporarily to allow cleanup even in case of error
staged_exit=0
if ! npx lint-staged; then
staged_exit=1
fi
# Workaround to clean up temporary files generated by tsc-files
# See https://github.com/gustavopch/tsc-files/issues/39
rm -f ./tsconfig.*.tsbuildinfo
exit $staged_exit
Unfortunately, I haven't had any free time and I'm not using this project myself anymore, so no time to update it. But the whole thing is less than a 100 lines. I suggest to just copy from the source and use as a local script where you can freely adjust to your needs.