code: function(path, options) {
  
          var errors = hintFiles([path],
                                 {options: options.jshintOptions,
                                  withDefaults: options.withDefaults,
                                  globals: options.globals},
                                 false);
          var flattened_errors = [].concat.apply([], errors);
          var formatted_errors = flattened_errors.map(function(error) {
              return '' + path + ': ' + error.line + ":" + error.character + " " + error.reason;
          });
  
          return formatted_errors.join('\n');
      }
docs: Please see the Grunt documentation for more information regarding task creation: http://gruntjs.com/creating-tasks