Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode not suggesting ES6 imports?

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

like image 641
Alvaro Avatar asked Oct 25 '25 04:10

Alvaro


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/**/*"],
}
like image 166
Alvaro Avatar answered Oct 26 '25 16:10

Alvaro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!