简体   繁体   English

在开发过程中如何使用Webpack或vs代码连续运行tslint

[英]How to run tslint continuously with webpack or vs code during development

When I was using gulp in an Angular 1.x project, I can use gulp to watch files changes and run eslint continuously. 当我在Angular 1.x项目中使用gulp时,我可以使用gulp监视文件更改并连续运行eslint。 In my Angular 2 project, I am using webpack and vs code, how do I make tslint continuously running? 在我的Angular 2项目中,我正在使用webpack和vs代码,如何使tslint连续运行?

I tried this but it doesn't work: 我试过了,但是没有用:

"watch:lint": "npm run tslint \"src/**/*.ts\" -- --watch",

I haven't tried integrating tslint with vs code. 我还没有尝试将tslint与vs代码集成在一起。 Can vs code give me constant feedback on the files that I am working on with tslint? vs代码能否为我使用tslint处理的文件提供持续的反馈? Any info is appreciated. 任何信息表示赞赏。

That's probably not exactly what you're looking for, but tslint-loader might be useful 那可能不完全是您想要的东西,但是tslint-loader可能会有用

https://github.com/wbuchwalter/tslint-loader https://github.com/wbuchwalter/tslint-loader

It poses a preLoader and check files before compilation. 它构成一个preLoader并在编译之前检查文件。

Hope it helps 希望能帮助到你

For single execution 单次执行

  1. install gulp 安装gulp
  2. run the command gulp tslint 运行命令gulp tslint

Alternatively, This vscode extension would make your work much more easy 另外,此vscode扩展将使您的工作更加轻松

VS Code tslint VS Code tslint

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

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