I just finished my JS code. Now I moved it into its own file, and now PHPStorm tells me that there is no variable called $. How do I fix this? (Can JSDoc solve it?)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Probably PHPStorm sees no declaration of a
$variable in your JS file. Check if you properly copied your code.If
$is a global variable (jQuery of something like that) you can add such a line at the top of your JS file/*global $: false */.JSDoc has nothing to do with that as far as I know. Other tool, which is built-in PHPStorm like JSHint or JSLint, checks correctness of JavaScript code.