jshint is throwing an error when defining an angular module (or directive, or factory) as recommended by the Angular style guides (by John Papa or Todd Motto). For example,
So another option, that makes every linter happy, is to declare the variable that'll hold the function first, use it as a param, and then define it.
But personally I'm not sure I love the flow here. I think I like jack's answer better, but this is a little closer to what Papa seems to prefer, if you're down with his style guide. Actually, I'm not sure why this isn't what he recommends, if he really wants functions to appear after they're used (and he does). Otherwise, you can't use his style with latedef set to true in JSHint -- or JSLint at all.
(function () {
'use strict';
var theController;
angular
.module('myApp')
.controller('myAppCtrl', theController);
theController = function () {
return "so jslint doesn't complain about empty blocks";
};
}());