繁体   English   中英

不同文件上的角度cli错误输出

[英]angular cli lint error export on a different file

我在我的angular2项目中使用angular cli 当我使用lint命令进行整理和格式化代码时,如下所示

ng lint

我可以在命令提示符下看到一些错误,如下所示

src/app/quote/your-cart/your-cart.component.ts[118, 9]: missing whitespace
src/app/quote/your-cart/your-cart.component.ts[129, 8]: missing whitespace
src/app/quote/your-cart/your-cart.component.ts[130, 9]: missing whitespace
src/app/quote/your-cart/your-cart.component.ts[142, 21]: missing whitespace

由于它报告了大量错误,因此我想在某些文件上导出该错误。 可以是HTML,TXT,甚至JSON也可以。

简而言之,我想将角度倾斜错误导出到某个文件。

请帮忙。

ng lint打印到标准输出,因此执行:

ng lint > out.txt

在* nix和Windows上均可使用

ng lint | findstr“ name.module.ts”
ng lint | git bash中的grep“ name.module.ts”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM