VSCode not suggesting ES6 imports?

Viewed 418

When I'm typing the import statement I get suggestions: enter image description here

However, when I move the mouse over the undefined function, I only get the following:

"'setMouseHijack' is not defined. (W117)jshint(W117)"

Without any suggested import.

Am I missing something? Isn't VSCode supposed to suggest me the improvement when I move the mouse over those undefined variables/functions if available to import?

enter image description here

The "Quick fix" won't suggest the import either: enter image description here

1 Answers

I ended up solving it by enabling the checkJS flag in VSCode's settings.

enter image description here

Also on the jsconfig.json file:

{
    "compilerOptions": { 
        "checkJs": true,
    },
    "updateImportsOnFileMove": "prompt",
    "include": ["js/**/*"],
}
Related