1.0.6 • Published 2 years ago

ts-nocheck v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Default behavior

Prepends // @ts-nocheck to the top of all .js, .jsx, .ts and .tsx files in a given directory. Will not add one if one already exists.

Usage

$ npx ts-nocheck .

API

ts-nocheck [options] dir

Options configuration:
  --js-off                Disable adding nocheck to js files
  --jsx-off               Disable adding nocheck to jsx files
  --ts-off                Disable adding nocheck to ts files
  --tsx-off               Disable adding nocheck to tsx files
  --smart-check-off       Add nocheck to all js, jsx, ts, tsx files even if it already has one

Motivation

Changing the file extension of all your .js/.jsx files to .ts/.tsx at once at the start of your migration comes with the benefit of much more readable Git diffs in the future. For example, if a file is renamed (aka extension changed) and then enough file changes are made, Git will list this as two seperate files, a file deletion (JS file) + a brand new file (TS file). This makes the diffs hard to compare.

However, changing all file extensions to .ts/.tsx at once obviously prevents you from compiling until types for all files are added. Adding // @ts-nocheck to the top of all your files can help ease the pain of a JS to TS migration.

Pairs well with tools such as js-to-tsx.

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago