I would like a way for Visual Studio Code to always show me which TypeScript files in my project has an error. I would like these shown to me on the problems gadget on the bottom status bar, as well as represented with a red font and a red dot in the file explorer view on the left side. How can I achieve this?
- Make sure you have a
tsconfig.jsonfile at the root of your project. The contents of it does not matter, it can be just an empty file. All that matters is that it is present, so that, as far as I can tell, Visual Studio Code will be able to tell that this is a TypeScript project and hence, it will enable the built-in TypeScript extension for the project.
- Press CMDSHIFTp, type "task" and select "Tasks: Run Task".
- Type "watch" and select "tsc: watch - tsconfig.json". That is, we're running a task named
tsc: watch, which comes from the
tsconfig.jsonfile (where, in reality, it simply comes from the built-in TypeScript extension in Vi