Ignore specific errors from specific files. #78291
Labels
error-list
Problems view
*out-of-scope
Posted issue is not in scope of VS Code
typescript
Typescript support issues
I think this request is distinct from a few other similar requests because filtering all the errors from a number of files isn't the goal, only specific errors, and also because it would be preferable to ignore these errors in the editor as well.
My specific use-case is turning on strictNullChecks in tsc, which for a large project is just not feasible given the number of errors thrown up. It would be nice to be able to enable strictNullChecks for all new files, while allowing old files to be slowly migrated over time. Ideally this would be done through tsconfig, but the Typescript team have cited various problems with doing this and have decided not to make this possible (related issues: microsoft/TypeScript#8405 microsoft/TypeScript#8855). Using a separate tsconfig for your IDE and for the build you can have the errors show up, but keep your project building, however it's not ideal to have so many errors in the problems pane. It makes it hard to notice actual problems and all of the red in your old files is very distracting when you're not trying to migrate them.
Some method of ignoring errors (not just filtering them from the problems pane, hiding them in the editor as well) would be useful.
Maybe a setting which looks something like:
If the vscode team isn't keen on a change like this, would it be possible for me to extend the built-in Typescript extension to filter out the errors I want to ignore from the tsserver responses? Any advice on how to go about that would be helpful. Cheers.
The text was updated successfully, but these errors were encountered: