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,
well first of include angular in your "globals variables", for example:
"globals": { // Global variables.
"jasmine": true,
"angular": true,
"browser": true,
"element": true,
"by":true,
"io":true,
"_":false,
"$":false
}
then move your function definition before you reference it from angular.
(function () {
'use strict';
function theController() {...}
angular
.module('myApp')
.controller('myAppCtrl', theController);
})();