title: JSLint in brackets: Is there a way to use variables defined in other files?
body: <p>Currently I'm working on trying to refactor my code.</p>
  
  <p>One of the ways I'm doing this is to separate different functions such as an enemies physics into different files such as enemy.js.</p>
  
  <p>In addition to this, I have a globals.js that contains all global variables and constants such as the amount of gravity to be applied every tick.</p>
  
  <p>If I have the line of code:</p>
  
  <pre><code>enemy.y += gravity;
  </code></pre>
  
  <p>Run every tick in enemy.js and:</p>
  
  <pre><code>var gravity = 0.1;
  </code></pre>
  
  <p>In globals.js, since global variables are accessible in all javascript files, even if they are externally defined, the value for enemy.y will increase and thus the enemy will move down every time it is redrawn.</p>
  
  <p>However when run through jslint using brackets, I get:</p>
  
  <pre><code>'gravity' was used before it was defined.
  </code></pre>
  
  <p>Since the variable was not defined in the same file as the one jslint is looking at, if I move gravity into the same file, the error no longer appears, but this kind of makes the multi-file approach useless.</p>
  
  <p>The issue is, this error message is still very useful, for instance if i misspell a constant name such as if i type graviy instead, i would get:</p>
  
  <pre><code>'graviy' was used before it was defined.
  </code></pre>
  
  <p>And i would know i misspelled a constant name.</p>
  
  <p>So i do not want to supress this error message, instead, is there a way to tell jslint to include global variables defined in other javascript files without having to re-define them?</p>