standard-cliengine
Version:
expose ESLint instance of standard-engine
17 lines (16 loc) • 400 B
JavaScript
module.exports = function (linter) {
var Linter = linter.constructor;
if (!Linter.prototype.executeOnText) {
Linter.prototype.executeOnText = function (text, filename, warnIgnored) {
return new this.eslint.CLIEngine(this.eslintConfig).executeOnText(
text,
filename,
warnIgnored
);
};
}
return function () {
return linter;
};
};
;