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

时光总嘲笑我的痴心妄想 提交于 2019-12-25 08:49:22

问题


When I was using gulp in an Angular 1.x project, I can use gulp to watch files changes and run eslint continuously. In my Angular 2 project, I am using webpack and vs code, how do I make tslint continuously running?

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. Can vs code give me constant feedback on the files that I am working on with tslint? Any info is appreciated.


回答1:


That's probably not exactly what you're looking for, but tslint-loader might be useful

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

It poses a preLoader and check files before compilation.

Hope it helps




回答2:


For single execution

  1. install gulp
  2. run the command gulp tslint

Alternatively, This vscode extension would make your work much more easy

VS Code tslint



来源:https://stackoverflow.com/questions/41944117/how-to-run-tslint-continuously-with-webpack-or-vs-code-during-development

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!