"$" jQuery shortcut underlined as "unresolved function or method"


Today, I decided to start a jQuery project in WebStorm (jQuery is located in assets/js/lib/jquery-3.3.1.min.js relative to the root directory) and I noticed that the "$" shortcut is always underlined and marked as "Unresolved function or method $()". 

How can I get WebStorm to recognize that the dollar sign is indeed valid so it no longer warns me?

Thank you for your help,


1 comment
Comment actions Permalink

Types resolving won't work when using minified library version (jquery-3.3.1.min.js), but downloading typings (@types/jquery) should work:

- in Settings | Languages & Frameworks | JavaScript | Libraries, press Download..., choose jquery from the list

Or, install it in your project:

- in terminal, cd to your project root folder

- run npm i @types/jquery  command


Please sign in to leave a comment.