Created
June 17, 2020 15:23
-
-
Save msgirlperl/8ed865268eca531e8f09950b3a44ee6e to your computer and use it in GitHub Desktop.
This file contains 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 | |
isInFile=$(cat tsconfig.json | grep -c "\"noUnusedLocals\": true,") | |
if [ $isInFile -eq 1 ]; then | |
#toggle Off | |
echo 'changing to allow unusedLocals' | |
sed -i '' 's/"noUnusedLocals": true,/"noUnusedLocals": false,/' tsconfig.json | |
else | |
#toggle On | |
echo 'changing to prevent unusedLocals' | |
sed -i '' 's/"noUnusedLocals": false,/"noUnusedLocals": true,/' tsconfig.json | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment