pretty-ts-errors icon indicating copy to clipboard operation
pretty-ts-errors copied to clipboard

CLI support please!

Open zodman opened this issue 1 year ago • 5 comments

tsc --noEmit | pretty-ts-errors

zodman avatar Apr 21 '23 00:04 zodman

Doing the cli you will kill #26 #21 and support others ...

zodman avatar Apr 21 '23 00:04 zodman

Perhaps a cli flag... for ease of use, the default would be this, but something like pretty-ts-errors --lsp would follow the LSP protocol, allowing 26, 21, and other ide requests.

Then again, you may get a one-size-fits-all senario, and perhaps this would be better to be in a separate application.

I personally prefer the LSP support than this, however, I can see the appeal here, and can support this provided it doesn't restrict the potential LSP support.

aarondill avatar Apr 24 '23 12:04 aarondill

@zodman I'm not sure it will solve #26 and #21, but I agree it will be helpful and lsp it's the path for that. @johnsoncodehk already did a POC of that in volar. I'm working now on moving to a monorepo and publishing the core functions as packages. It'll allow the community to collaborate and support other platforms like Neovim, cli, etc

yoavbls avatar Apr 26 '23 16:04 yoavbls

I would take any and all loss of functionality to be able to run this at the command line because I'm not a VSCode user. I have no oranges. :) If I get 10 oranges instead of 12 I will still enjoy that juice very much!

crrobinson14 avatar Jun 14 '24 16:06 crrobinson14

I created a CLI for this: https://github.com/voxpelli/pretty-ts-errors-cli

In addition to pretty printing directly in the terminal it also contains an option to generate markdown, so that one can easily copy and paste a pretty error to eg. a GitHub issue

voxpelli avatar Sep 12 '24 12:09 voxpelli