'use strict';
var CLIEngine = require('eslint').CLIEngine;
var chalk = require('chalk');
var cli;
var report;
var formatter;
var format = '';
var configOptions = {};

module.exports = {

  configFile: function(config) {
    configOptions.configFile = config || '.eslintrc';
  },

  ignorePath: function(ignore) {
    configOptions.ignorePath = ignore || '.eslintignore';
  },

  envs: function(envs) {
    configOptions.envs = envs;
  },

  extensions: function(extns) {
    configOptions.extensions = extns;
  },

  globals: function(globals) {
    configOptions.globals = globals;
  },

  rulePaths: function(rulePaths) {
    configOptions.rulePaths = rulePaths;
  },

  rules: function(rules) {
    configOptions.rules = rules;
  },

  parser: function(parser) {
    configOptions.parser = parser;
  },

  cache: function(cache) {
    configOptions.cache = cache;
  },

  cacheFile: function(cacheFile) {
    configOptions.cacheFile = cacheFile;
  },

  cacheLocation: function(cacheLocation) {
    configOptions.cacheLocation = cacheLocation;
  },

  mochalint: function (paths, options) {
    configOptions.configFile = configOptions.configFile || '.eslintrc';
    cli = new CLIEngine(configOptions);
    if (options && options.formatter) {
      format = options.formatter;
    }
    describe('eslint-filter-coffee', function () {
      paths.forEach(function (p) {
        it('should have no errors in ' + p, function () {
          try {
            report = cli.executeOnFiles([ p ]);
            formatter = cli.getFormatter(format);
          } catch (err) {
            throw new Error(err);
          }

          if (report && report.errorCount > 0) {
            throw new Error(chalk.red('code did not pass lint rules') + formatter(report.results));
          }

          if (report && report.warningCount > 0) {
            console.log(chalk.yellow('code has lint warnings'));
            console.log(formatter(report.results));
          }
        });
      });
    });
  }
};

@@ -1046,16 +1046,96 @@
 ;%0A  %7D,%0A%0A
+  formatter: function(format) %7B%0A    formatter = cli.getFormatter(format);%0A  %7D,%0A%0A
   mochal
@@ -1158,17 +1158,8 @@
 aths
-, options
 ) %7B%0A
@@ -1274,88 +1274,8 @@
 s);%0A
-    if (options && options.formatter) %7B%0A      format = options.formatter;%0A    %7D%0A
     
@@ -1493,32 +1493,45 @@
      formatter =
+ formatter %7C%7C
  cli.getFormatte
@@ -1528,30 +1528,24 @@
 etFormatter(
-format
 );%0A         

Update format options in index js