Skip to content

Filter TypeScript errors for selected files #10337

Closed

Description

Hi, first of all, thanks for the awesome project. You're doing fantastic work.

I am in the process of gradually moving a codebase to using TypeScript. There are certain compiler options which I want to enable, namely no implicit any and strict null checking, however because I am moving things gradually, I only want to enforce these stricter rules on a subset of TypeScript files.

My solution to this is to wrap the TypeScript compiler, filtering out error messages from no implicit any and strict null checking where the file is not whitelisted as “strict”. For example: microsoft/TypeScript#8855 (comment)

However, I do not want to use such a solution in my project without corresponding feedback in my IDEs.

Is there any way I can wrap the TypeScript compiler used in vscode similarly to how I wrapped the TypeScript compiler in microsoft/TypeScript#8855 (comment)?

Or, perhaps I could use my wrapped compiler and send those errors to vscode instead of using the built in TypeScript errors?

Is there somewhere I can find the code that sends the TypeScript errors to vscode?

I want to achieve this for other plugins in other IDEs too, to suit all the developers in my team, but also because I think this will be useful to other people who are gradually moving their codebase to TypeScript and want to start using some of the stricter compiler options.

Thanks,
Olly

Activity

  1. jrieken commented on Aug 9, 2016

    @jrieken
    Contributor

    You should be able to use the task framework for that

  2. OliverJAsh commented on Aug 9, 2016

    @OliverJAsh
    ContributorAuthor

    Do you have any more details? I'm not sure what you are referring to :-)

    On Tue, 9 Aug 2016 at 10:18 Johannes Rieken notifications@github.com
    wrote:

    You should be able to use the task framework for that

    —
    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub
    #10337 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AA4QCWbJfn41b9VHTr8AE8f_J8i7loz2ks5qeEX4gaJpZM4Jf3Hc
    .

  3. jrieken commented on Aug 9, 2016

    @jrieken
    Contributor
  4. dbaeumer commented on Apr 26, 2017

    @dbaeumer
    Member

    Closing issue assuming that the task documentation help addressing this.

  5. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*questionIssue represents a question, should be posted to StackOverflow (VS Code)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions