Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"ng lint" quiet option?

How can I run ng lint without showing warnings? TSLint CLI provides a --quiet flag, but there doesn't appear to be one for Angular or a way to pass through CLI flags. I still want warnings in my tsconfig so they show up in the editor, but sometimes I only want a list of errors.

like image 749
Craig Smitham Avatar asked Jan 22 '19 21:01

Craig Smitham


1 Answers

Widnows solution:

You can use findstr which Searches for patterns of text. The parameter /v prints only lines that don't contain a match.

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/findstr

ng lint [PROJECT NAME] | findstr /v "WARNING: .*"

You can omit [Project Name] if you want to run everything in the directory

ng lint | findstr /v "WARNING: .*"
like image 66
9motom6 Avatar answered Sep 19 '22 14:09

9motom6