title: How to automate jshint as part of build process?
body: <p>I want to automatically run JSHINT on all my javascript files as part of our continuous integration environment (actually, probably as part of TFS Gated Checkin, but I'm not sure yet as it will depend on speed).</p>
  
  <p>I tried using <strong>rhino-jshint</strong> like this:</p>
  
  <pre><code>java -jar js.jar jshint-rhino.js myFile.js
  </code></pre>
  
  <p>but how can I set the required JSHint options? I know I could list them in a comment at the top of <code>myfile.js</code>, but I've got lots of javascript files, and I don't want the options duplicated in all my source files. (Or does JavaScript have an 'include' feature that I'm not aware of?)</p>
  
  <p>I had hoped to pass an <code>options.js</code> file in as a parameter on the command line, and then keep <code>options.js</code> under version control. But I don't think this is possible with jshint-rhino.js. </p>
  
  <p>Additionally, we are using a <a href="http://jslint4vs2010.codeplex.com/" rel="nofollow">Visual studio extension</a> to 'JSHint' all JavaScript files as we save them. But this tool cannot be ran on the command-line. We want the best of both worlds - running JSHint inside Visual Studio and Automated for the CI build, and then without duplicating the options (and indeed keeping the options under version control). </p>
  
  <p>So the question is, how do other people automate JSHint in their development process? </p>