Update: Turns out that this is a duplicate of: JSLint: Using a function before it's defined error
We have freshly adopted jslint in our project, and as it promised - jslint starts hurting our feelings. But not only that, it makes us questioning quite a few of the rules it has. To be honest, to me it resembles ANSI C programming style somehow. Here's one:
JS Lint: 'someMethodFoo' was used before it was defined.
This occurs because we use a top-down coding style: Each file first contains the most important method. The implementation of that method is broken down into "sub"-method calls to keep the code clean and well-structured. This implies that in most cases, methods are used before they are defined. In fact, I consider this a good practice, it makes the code better understandable for future readers, and thus more maintainable.
Why would JS Lint want us to turn it upside down?
We could simply turn off this option by using the --undef flag. But are there reasons against that? For example, does the order influence the performance of an interpreter? Does that matter in an age when every browser sooner or later switches from interpreters to compilers?