Skip to content

[Migrating] Mention ts-fix among useful tools #769

Open
@pjonsson

Description

@pjonsson

What cheatsheet is this about? (if applicable)

Migrating cheatsheet

What's your issue or idea?

Ts-fix is a CLI for applying TypeScript codefixes, and I feel that should be mentioned among the useful tools.

Source repository here: https://github.com/microsoft/ts-fix

To automatically fix an issue, enable some more warnings in tsconfig.json and run like this:

ts-fix -t ./tsconfig-with-more-warnings.json -e 7006 --write --ignoreGitStatus --file src/**/*.ts

The 7006 code is to apply the fix that adds type annotations on parameters with an implicit any type. There might be a better way to find the code for the fix, I just look here and search for some part of the error message from the compiler: https://github.com/microsoft/TypeScript/blob/main/src/compiler/diagnosticMessages.json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MIGRATINGMigrating CheatsheetwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions