WEBUILDER_SCRIPTS['WB_EXEC_JSHINT'] = function(data1, data2) {
  if (data1 == 'WB_EXEC_JSHINT') {
    
    var lines = data2.split('\n');
    var filename = lines[0];
    var settings = JSON.parse(lines[1]);
    lines.splice(0, 2);
    
    JSHINT(lines, settings);
    
    var data = JSHINT.data();
    var res = "";
    
    if (data.errors && data.errors.length) {
      for (var i = 0; i < data.errors.length; i++) {
        res += filename + "(" + data.errors[i].line + ")" + data.errors[i].id + " " + data.errors[i].reason + "\n";
      }
    }
    
    WeBuilderData.SendNative("WB_EXEC_JSHINT_RESULTS", res, JSON.stringify(data));
  }
}