/*jslint es6, node, maxlen: 80 */

"use strict";

const abstractLinter = require("../abstract-linter.js");
const eslint = require("eslint").linter;

const linterName = "ESLint";

function lintAndLogWarnings(settings) {
    const options = settings.options === undefined
        ? {"extends": "eslint:recommended"}
        : settings.options;

    const warnings = eslint.verify(settings.data, options);

    settings.logWarnings(warnings);
}

function logWarning(warning) {
    console.log(`    line ${warning.line} column ${warning.column}
        ${warning.message}`);
}

function lint(config) {
    const settings = config || {};

    settings.lintAndLogWarnings = lintAndLogWarnings;
    settings.logWarning = logWarning;
    settings.linterName = linterName;

    return abstractLinter(settings);
}

module.exports = lint;

@@ -106,22 +106,25 @@
 ;%0Aconst 
-eslint
+CLIEngine
  = requi
@@ -136,22 +136,25 @@
 slint%22).
-linter
+CLIEngine
 ;%0A%0Aconst
@@ -356,56 +356,180 @@
 nst 
-warnings = eslint.verify(settings.data, options)
+cliEngine = new CLIEngine(%7B%0A        baseConfig: options,%0A        useEslintrc: false%0A    %7D);%0A%0A    const warnings = cliEngine.executeOnText(settings.data).results%5B0%5D.messages
 ;%0A%0A 

Fix #4 Some ESLint config options do not work