GithubHelp home page GithubHelp logo

isabella232 / ts-fix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/ts-fix

0.0 0.0 0.0 875 KB

CLI for applying TypeScript codefixes

License: MIT License

JavaScript 5.32% TypeScript 94.68%

ts-fix's Introduction

This tool is to automate the application of TypeScript codefixes across your TypeScript repositories.

Download

If cloning from GitHub, after cloning, run

npm run build
npm link

ts-fix can then be used in the command line

Example Usage

ts-fix -t path/to/tsconfig.json -f nameOfCodefix ts-fix -e 4114 --write

Flags

Options:
      --help          Show help                                              [boolean]
      --version       Show version number                                    [boolean]
  -t, --tsconfig      Path to project's tsconfig
                                                 [string] [default: "./tsconfig.json"]
  -e, --errorCode     The error code(s)                         [number] [default: []]
  -f, --fixName       The name(s) of codefixe(s) to apply       [string] [default: []]
  -w, --write         Tool will only emit or overwrite files if --write is included.
                                                            [boolean] [default: false]
  -o, --outputFolder  Path of output directory                                [string]
      --verbose       Write status to console during runtime        
                                                             [boolean] [default: true]

-t path/to/tsconfig.json or --tsconfig path/to/tsconfig.json Specifies the project to use the tool on. If no arguement given, the tool will use the tsconfig in the current working directory.

-e <number> or --errorCode <number> Specifies the errors to fix. Several error codes can be specified during the same command. The easiest way to find error codes in your repository is to hover over the error in your IDE.

-f <name> or --fixName <name> Specifies the types of codefixes to use. Several names can be specified.

If both error numbers and fix names are given, then in order to be applied, a fix must be generated by a specified error and have a name that was specified.

--write Boolean for if the tool should overwrite previous code files with the codefixed code or emit any files with codefixed code. If --write not included, then the tool will print to console which files would have changed.

--verbose Boolean for print to console diagnostics that happen during runtime. Set --no-verbose to turn these messages off.

ts-fix's People

Contributors

iisaduan avatar andrewbranch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.