I have a large javascript file that appears on every page of my site and defines a number of objects in global scope. On a few pages I have additional scripts that use and extend these objects. I don't want to concatenate them into single large scripts, and I don't want to manually declare which globals are available.
Is there any way to tell JSHint that script X depends on script Y, so look there first for global variables?
Note: I'm aware that I can manually inform JSHint of globals in comments in each file or throughout the project with a .jshintrc
file. I am asking for a way to tell JSHint to figure it out automatically, the way it would if script Y were prepended to script X before running JSHint.