You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
688 B
32 lines
688 B
/**
|
|
* @fileoverview Expose out ESLint and CLI to require.
|
|
* @author Ian Christian Myers
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
const { CLIEngine } = require("./cli-engine");
|
|
const { Linter } = require("./linter");
|
|
const { RuleTester } = require("./rule-tester");
|
|
const { SourceCode } = require("./source-code");
|
|
|
|
module.exports = {
|
|
Linter,
|
|
CLIEngine,
|
|
RuleTester,
|
|
SourceCode
|
|
};
|
|
|
|
// DOTO: remove deprecated API.
|
|
let deprecatedLinterInstance = null;
|
|
|
|
Object.defineProperty(module.exports, "linter", {
|
|
enumerable: false,
|
|
get() {
|
|
if (!deprecatedLinterInstance) {
|
|
deprecatedLinterInstance = new Linter();
|
|
}
|
|
|
|
return deprecatedLinterInstance;
|
|
}
|
|
});
|
|
|