Skip to content

Instantly share code, notes, and snippets.

@sidola
Last active June 20, 2021 10:26
Show Gist options
  • Save sidola/27340e1714849b4f3037b68533baad96 to your computer and use it in GitHub Desktop.
Save sidola/27340e1714849b4f3037b68533baad96 to your computer and use it in GitHub Desktop.
VSCode re-compile TS files and report errors
{
"version": "2.0.0",
"tasks": [
{
"label": "[C] re-validate typescript",
// Find your TS compiler, it's usually here or globally as "tsc"
"command": "./node_modules/typescript/bin/tsc",
// Pass the arg "-p" and point to our tsconfig file
"type": "shell",
"args": [
"--project",
"./tsconfig.json",
"--noEmit"
],
// Blocks terminal from popping up on complete
"presentation": {
"reveal": "never",
},
// Reports as TS errors
"problemMatcher": "$tsc"
},
{
"label": "[C] eslint",
"type": "npm",
"script": "eslint",
"problemMatcher": [
"$eslint-stylish"
],
"presentation": {
"reveal": "never",
},
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment