node.js - Visual Studio Code not performing error checking in Javascript - Stack Overflow

I've tried following these instructions:I am not getting the greenred swiggly lines at all. Is th

I've tried following these instructions:

I am not getting the green/red swiggly lines at all. Is there something I'm missing?

You can also see the same thing in this video:

As far as I know, they're running the default editor. I've tried installing typings and typescript using npm. I've Followed that tutorial to get Javascript intellisense for node.js, but I fail to get either error/warning checking or any type information for node.js modules.

Is there a location the type files should be installed to in order to make them global to every JS project you create in VS Code?

I've tried following these instructions:

https://code.visualstudio./Docs/runtimes/nodejs

I am not getting the green/red swiggly lines at all. Is there something I'm missing?

You can also see the same thing in this video:

https://youtu.be/sE8_bTEBlFg?t=1m37s

As far as I know, they're running the default editor. I've tried installing typings and typescript using npm. I've Followed that tutorial to get Javascript intellisense for node.js, but I fail to get either error/warning checking or any type information for node.js modules.

Is there a location the type files should be installed to in order to make them global to every JS project you create in VS Code?

Share Improve this question asked May 7, 2016 at 12:43 user2848971user2848971 3
  • Is the node exe in your PATH environment variable? – Andy Commented May 7, 2016 at 13:16
  • @Andy Yes. Would that affect it at all? – user2848971 Commented May 7, 2016 at 13:19
  • No, it should be in there. I was just checking :) – Andy Commented May 7, 2016 at 13:20
Add a ment  | 

2 Answers 2

Reset to default 0

OK, so I managed get get some code suggestions working after reading up online. Without using the whole Typings tools, I acquired node.d.ts (found it on my puter inside C:\Program Files (x86)\Microsoft VS Code\resources\app\extensions) and placed that in my project's directory structure inside the ".vscode" folder. At the top of my .js file I added the following line:

/// <reference path=".vscode/node.d.ts" />

The code seems to be recognized now. I read up on this tip here: How to Import Intellisense files into vsCode (Visual Studio Code)

If you are using ESLint and you have an .eslint.js file in the project root you also need the eslint dependency installed in the project. Otherwise, if there is a .eslint.js file but the ESLint dependency is not installed Visual Studio Code will report nothing in the editor.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744843485a4596698.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信