tsc-err-dirs
Display tsc errors count on file tree, can hot update when you change those files.
Screeshot
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.
- Use
tsc --noEmit --pretty false
to get all the errors of each file which are not prettified format. - Extract stdout and parse it to get the errors info of each file.
- Use inquirer-file-tree-selection-prompt to display the errors count on file tree.
License
MIT License © 2022 ShenQingchuan