@slackoff/tsc-err-dirs
TypeScript icon, indicating that this package has built-in type declarations

0.0.23 • Public • Published

tsc-err-dirs npm

中文文档

Display tsc errors count on file tree, can hot update when you change those files.

Screeshot

image

Requirement

  • node version: >=16
  • tsc version: >=4.5.5
  • Installed Nerd Font

Warning: We recommend you to use this CLI app in Mac OS or Linux, since it's using a lot of shell features which may not have good support in Windows.

Install

npm i -g @slackoff/tsc-err-dirs

Usage

# the project root path MUST contains `tsconfig.json`
tsc-err-dirs <path-to-your-project-root>

Options

  • --engine (shorthand: -e)

    Type: 'tsc' | 'vue-tsc'

    Select which tsc to be executed.

Internal

Since tsc doesn't provide a way to get the errors count of each file, we have to use a trick to get it.

  1. Use tsc --noEmit --pretty false to get all the errors of each file which are not prettified format.
  2. Extract stdout and parse it to get the errors info of each file.
  3. Use inquirer-file-tree-selection-prompt to display the errors count on file tree.

License

MIT License © 2022 ShenQingchuan

Readme

Keywords

none

Package Sidebar

Install

npm i @slackoff/tsc-err-dirs

Weekly Downloads

1

Version

0.0.23

License

MIT

Unpacked Size

157 kB

Total Files

25

Last publish

Collaborators

  • kahralab_founder