The following is what I want to disable:
I can't find it in settings.
Help appreciated as this is really annoying.
While CommonJS and ES6 modules share similar syntax, they work in fundamentally different ways: ES6 modules are pre-parsed in order to resolve further imports before code is executed. CommonJS modules load dependencies on demand while executing the code.
An ES6 Module can load other ES6 modules using import. An ES6 Module can load CommonJS using import. A CommonJS module can load other CommonJS modules using require. A CommonJS module previously COULD NOT load an ES6 Module, but today it can load an ES6 module using the import() function.
ES modules are the standard for JavaScript, while CommonJS is the default in Node. js. The ES module format was created to standardize the JavaScript module system. It has become the standard format for encapsulating JavaScript code for reuse.
CommonJS modules are the original way to package JavaScript code for Node. js. Node. js also supports the ECMAScript modules standard used by browsers and other JavaScript runtimes.
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.)
For anyone using Vim with coc.nvim, you can make the same change by adding the same in the :CocConfig
object:
"javascript.suggestionActions.enabled": false
If you haven't added any settings to :CocConfig
before, then you need to make sure the above setting is wrapped in a JSON object:
{ "javascript.suggestionActions.enabled": false }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With