如何禁用:[js] 文件是一个 CommonJS 模块;它可以转换为 ES6 模块 [英] How do I disable: [js] File is a CommonJS module; it may be converted to an ES6 module

查看:187
本文介绍了如何禁用:[js] 文件是一个 CommonJS 模块;它可以转换为 ES6 模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我要禁用的:

我在设置中找不到它.
帮助表示赞赏,因为这真的很烦人.

解决方案

这是 Visual Studio Code 中添加的一项新功能,称为建议代码操作".建议代码操作"在 JavaScript 和 TypeScript 中默认启用.

您可以通过在您的用户/工作区设置中设置:"typescript.suggestionActions.enabled": false"javascript.suggestionActions.enabled": false 来禁用它们.可以在(图片由 Yusuf Yaşar 提供.)

The following is what I want to disable:

I can't find it in settings.
Help appreciated as this is really annoying.

解决方案

This is a new feature added in Visual Studio Code called "Suggestion Code Actions". "Suggestion Code Actions" are enabled by default in JavaScript and TypeScript.

You can disable them by setting: "typescript.suggestionActions.enabled": false or "javascript.suggestionActions.enabled": false in your user/workspace settings. The documentation can be found here.

(Image provided by Yusuf Yaşar.)

这篇关于如何禁用:[js] 文件是一个 CommonJS 模块;它可以转换为 ES6 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆