简体   繁体   English

WebStorm在快捷方式上执行TSLint

[英]WebStorm execute TSLint on shortcut

I want to use TSLint to autofix current errors in opened file (not whole project). 我想使用TSLint自动修复打开的文件(不是整个项目)中的当前错误。 I can do it by writing tslint $FilePathRelativeToProjectRoot$ --fix in console, but I rather want to create custom shortcut or as trigger on file save. 我可以通过在控制台中编写tslint $FilePathRelativeToProjectRoot$ --fix来实现,但是我想创建自定义快捷方式或作为文件保存的触发器。

Does someone has an experience with this kind of set up? 有人对这种设置有经验吗?

You can set up TSLint as a file watcher : 您可以将TSLint设置为文件监视程序

在此处输入图片说明

make sure to clear Auto-save edited files to trigger the watcher checkbox to have the watcher triggered on explicit Save all action ( Ctrl+S ) 确保清除自动保存编辑的文件以触发监视程序复选框,以使监视程序在显式保存所有操作( Ctrl+S )上触发

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

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