Created
August 23, 2021 23:40
-
-
Save sirbrillig/425c89040bb51e04ce5c2f8f854a66bd to your computer and use it in GitHub Desktop.
A way to run tsc on a single file in my project; copied from https://stackoverflow.com/a/60950355/2615868
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
TMP=.tsconfig-lint.json | |
cat >$TMP <<EOF | |
{ | |
"extends": "./tsconfig.json", | |
"include": [ | |
EOF | |
for file in "$@"; do | |
echo " \"$file\"," >> $TMP | |
done | |
cat >>$TMP <<EOF | |
"unused" | |
] | |
} | |
EOF | |
yarn tsc --project $TMP --skipLibCheck --noEmit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment