简体   繁体   English

VSCode:如何禁用有关已弃用的 Node.js 功能的警告

[英]VSCode: how to disable warnings about deprecated Node.js features

I'm using VSCode for a Javascript project that runs in a browser JS engine;我将 VSCode 用于在浏览器 JS 引擎中运行的 Javascript 项目; it will never and can't run in Node.js.它永远也不能在 Node.js 中运行。 But Intellisense quite dramatically warns about features in my code that are deprecated in Node.js.但是 Intellisense 对我的代码中在 Node.js 中已弃用的功能发出了非常明显的警告。 Is there a way to tell it, that this is not a node but a browser project to get only relevant warnings?有没有办法告诉它,这不是一个节点,而是一个仅获取相关警告的浏览器项目?

Strikethrough in code and warning in Intellisense popup代码中的删除线和 Intellisense 弹出窗口中的警告

if you use eslint as linter.如果你使用 eslint 作为 linter。 You can do it in the .eslintignore file in your root directory.您可以在根目录中的 .eslintignore 文件中执行此操作。

take a look here: disable the warnings in VS code看看这里: 禁用 VS 代码中的警告

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

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