[英]angular cli lint error export on a different file
I am using angular cli for my angular2 project. 我在我的angular2项目中使用angular cli 。 While I am using lint command for linting-and-formatting-code as follows
当我使用lint命令进行整理和格式化代码时,如下所示
ng lint
I am able to see several errors on my command prompt as follows 我可以在命令提示符下看到一些错误,如下所示
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
Since it is reporting a huge list of errors, I want to export that error on some file. 由于它报告了大量错误,因此我想在某些文件上导出该错误。 It could be HTML, TXT, or Even JSON is also fine.
可以是HTML,TXT,甚至JSON也可以。
In a nutshell I want to export angular cli lint error to some file. 简而言之,我想将角度倾斜错误导出到某个文件。
Please help. 请帮忙。
ng lint
prints to stdout so execute: ng lint
打印到标准输出,因此执行:
ng lint > out.txt
Works on both *nix and Windows 在* nix和Windows上均可使用
ng lint | ng lint | findstr "name.module.ts"
findstr“ name.module.ts”
ng lint | ng lint | grep "name.module.ts" in git bash
git bash中的grep“ name.module.ts”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.