I fixed this by simply adding var alert; However, is this what I should be doing to get the pesky error message to go away? Here is the fix. Here is the fail
Instead of
alert('message')
you should use
window.alert('message');
Because this method is defined in window object.
This of course assumes you have browser option set to true in your .jshintrc, so this way jshint will know window object is exposed.
"browser" : true, // Standard browser globals e.g. window, document.
*The same thing happens with confirm().