0

I don't know why, but after some things that I've done, there appear too many intellisense suggestions in VS Code:

in directory that have issue

Does anyone know how to remove all the ones that come from core-js?

there is git with package.json

also don't have any unusual extensions extensions

list of extensions that probably modify snippets: Easy Snippet(inu1255),Reactjs code snippets(charalampos karypidis)

QresT
  • 5
  • 2
  • 1
    Hy, welcome to Stack Overflow, please [don't upload text, table or error message as image](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors/285557#285557). Edit your question to contain all the information in text form - consider to use the editor's formatting options. Also see [How to Ask](https://stackoverflow.com/help/how-to-ask) – Daxelarne Feb 09 '23 at 12:04
  • 1
    Does this answer your question? [Delete a specific Intellisense suggestion in VS Code](https://stackoverflow.com/questions/58049533/delete-a-specific-intellisense-suggestion-in-vs-code) – Lionel Rowe Feb 09 '23 at 12:26
  • Can you share the specific extension you're using? I just have the basic JS setup and it's showing only the first three options for me, which seems to be what you're after. – Dominic R. Feb 09 '23 at 12:32
  • @DominicR. I'm uploaded it. Now just trying to figure how to fix that, i guess it's some with package.json couse without node_modules i dont have that trouble – QresT Feb 09 '23 at 12:56
  • @QresT Please post the extensions as text so people can find your question. See the link Daxelarne posted. You likely found StackOverflow by using search engines. To make more people find your question (and later also the answer) it is helpful if you write it as text. – Peter Krebs Feb 09 '23 at 13:55

1 Answers1

0

I'd look at disabling VS Code's automatic type acquisition feature for your workspace (or for your user). To disable for your workspace, edit your workspace's .vscode/settings.json. To disable for your user, edit your user settings.json (use the Preferences: Open User Settings (JSON) command in the command palette).

The specific setting value is:

"typescript.disableAutomaticTypeAcquisition": true,

That setting's description says:

Disables automatic type acquisition. Automatic type acquisition fetches @types packages from npm to improve IntelliSense for external libraries.

That link it links to says this:

IntelliSense for JavaScript libraries and frameworks is powered by TypeScript type declaration (typings) files. Type declaration files are written in TypeScript so they can express the data types of parameters and functions, allowing VS Code to provide a rich IntelliSense experience in a performant manner.

Many popular libraries ship with typings files so you get IntelliSense for them automatically. For libraries that do not include typings, VS Code's Automatic Type Acquisition will automatically install community maintained typings file for you.

Automatic type acquisition requires npmjs, the Node.js package manager, which is included with the Node.js runtime.

core-js is one such package that does not come with its own type declaration files (at least- at the time of this writing). You can tell by the blue-outlined icon on its npm page that has the letters "DT" in it, which stands for "Definitely Types", which is the name of the TypeScript community project that maintains type definition files for JavaScript libraries and other projects that do not provide their own.

If you still want type declarations for IntelliSense for specific package dependencies you use, just explicitly specify the @types/<package-name> dependencies in your devDependencies field in your package.json file for those specific package dependencies.

starball
  • 20,030
  • 7
  • 43
  • 238