How to tell JSHint to look for definitions in another JS file
问题 Here's the problem: I'm using JSHint in Grunt. I have a couple JS files and they'll be merged into one file in the end. But before merging, I would like to run JSHint. However, JSHint complaints some undefined variables. Here's an example: 1. JavaScript/file_one.js defines a variable: var Foo = (function (){}()); 2. JavaScript/file_two.js uses that module. new Foo(). jshint: { files: ['Gruntfile.js', 'javascript/**/*.js', ], options: { // some options. } } JSHint complaints that Foo isn't