1 | /**
|
2 | * @fileoverview Expose out ESLint and CLI to require.
|
3 | * @author Ian Christian Myers
|
4 | */
|
5 |
|
6 | ;
|
7 |
|
8 | const Linter = require("./linter");
|
9 |
|
10 | module.exports = {
|
11 | Linter,
|
12 | CLIEngine: require("./cli-engine"),
|
13 | RuleTester: require("./testers/rule-tester"),
|
14 | SourceCode: require("./util/source-code")
|
15 | };
|
16 |
|
17 | let deprecatedLinterInstance = null;
|
18 |
|
19 | Object.defineProperty(module.exports, "linter", {
|
20 | enumerable: false,
|
21 | get() {
|
22 | if (!deprecatedLinterInstance) {
|
23 | deprecatedLinterInstance = new Linter();
|
24 | }
|
25 |
|
26 | return deprecatedLinterInstance;
|
27 | }
|
28 | });
|