title: WebStorm: define variables in separate JS file?
body: <p>I have split all my functions into a separate <code>functions.js</code> file.  I am defining my variables in the <code>main.js</code> script file. WebStorm throws warnings that my variables are implicitly declared or that they are never used.</p>
  <p>Is there a way to reference <code>script.js</code> from <code>functions.js</code>?</p>
  <p>I tried adding <code>scripts.js</code> to the &quot;libraries&quot; screen at the project level but this did not help.</p>
  <p><strong>Definitions in script.js</strong></p>
  <p><img src="https://i.stack.imgur.com/kQf5i.png" alt="Definitions in script.js" /></p>
  <p><strong>Variable implicitly declared</strong></p>
  <p><img src="https://i.stack.imgur.com/LKVri.png" alt="Variable implicitly declared" /></p>
  <p>more:</p>
  <blockquote>
  <p>Checks JavaScript variables to be declared explicitly with var statement. The validation works in JavaScript, html or jsp files.</p>
  </blockquote>