简体   繁体   English

Visual Studio Code,tslint和虚拟机

[英]Visual Studio Code, tslint and virtual machine

I'm using Visual Studio Code on my computer to develop a project (angular). 我在计算机上使用Visual Studio Code开发一个项目(角度)。 The files of my project are located on a virtual machine. 我的项目文件位于虚拟机上。

Visual Studio Code works fine, I can edit my files without any problem but I can't see tslint errors. Visual Studio Code可以正常工作,我可以毫无问题地编辑文件,但是看不到tslint错误。 I would like to fix all tslint error I see by using "ng lint" command on my VM (via Putty) in Visual Studio Code. 我想通过在Visual Studio Code中在我的VM(通过Putty)上使用“ ng lint”命令来修复我看到的所有tslint错误。

When I'm trying to launch commands into the Visual Studio Code terminal, I've got errors : 当我尝试将命令启动到Visual Studio Code终端时,出现错误:

PS Microsoft.PowerShell.Core\FileSystem::\\192.168.0.141\Work\MyProject> ng lint
ng : Le terme «ng» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès
est correct et réessayez.
Au caractère Ligne:1 : 1
+ ng build
+ ~~
    + CategoryInfo          : ObjectNotFound: (ng:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

or by using this command 或使用此命令

./node_modules/@angular/cli/bin/ng

// it opens a file inside notepad... //它会在记事本中打开一个文件...

If I run these commands through Putty, it works. 如果我通过Putty运行这些命令,它将起作用。

The goal is to use lint command to fix every files of my project (or maybe, do it by modules). 目标是使用lint命令修复项目中的每个文件(或者可能由模块来修复)。 I'm little bit confused and I don't know what I've to do. 我有点困惑,我不知道该怎么办。

Any idea ? 任何想法 ?

Thank you very much 非常感谢你

EDIT : 编辑:

Info  - 15:21:37] vscode-tslint: Cannot read tslint configuration - 'ENOENT: no such file or directory, scandir '\\192.168.0.141\work\work\myProject\src\app\testModule\services

The path is not good, where can I change this ? 路径不好,在哪里可以更改?

The path is not good, where can I change this ? 路径不好,在哪里可以更改?

Try changing the tslint.configFile Visual Studio Code setting. 尝试更改tslint.configFile Visual Studio代码设置。 You can find it by going to File -> Preferences -> Settings and typing the name in the search box. 您可以通过以下方法找到它:转到文件->首选项->设置,然后在搜索框中输入名称。

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

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