Reputation: 1867
I'm in the habit of putting #warning messages in my c# code for anything that is bothering me or needs cleanup, as a to-do list that gives linting and reminds me every time I build the project - so they can't be ignored or stuck in a file that nobody will ever read.
Is there something similar I can use in TypeScript files?
Using VS 2019 with Web Compiler extension.
Upvotes: 0
Views: 524
Reputation: 1867
The best solution I have found is to use the Task List (Options | Environment | Task List).
Just add a comment like this in the .ts file:
// TODO: Warning / todo message goes here
It is not exactly the same as #warning as it does not show up in the error/warning list, and has no linting in the file/explorer tree, but it does appear in the Task List (View | Task List).
The main default token is "TODO" but we can add our own.
This lets me track the items directly in the source code without having to maintain some other file, but the task list is easier to ignore than #warnings.
Upvotes: 1