Skip to content

Commit

Permalink
feat: Expose LegacyESLint in unsupported API
Browse files Browse the repository at this point in the history
fixes #17340
  • Loading branch information
nzakas committed Jul 4, 2023
1 parent c667055 commit e7368d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/unsupported-api.js
Expand Up @@ -14,6 +14,7 @@
const { FileEnumerator } = require("./cli-engine/file-enumerator");
const { FlatESLint, shouldUseFlatConfig } = require("./eslint/flat-eslint");
const FlatRuleTester = require("./rule-tester/flat-rule-tester");
const { ESLint } = require("./eslint/eslint");

//-----------------------------------------------------------------------------
// Exports
Expand All @@ -24,5 +25,6 @@ module.exports = {
FlatESLint,
shouldUseFlatConfig,
FlatRuleTester,
FileEnumerator
FileEnumerator,
LegacyESLint: ESLint
};
8 changes: 8 additions & 0 deletions tests/lib/unsupported-api.js
Expand Up @@ -27,6 +27,14 @@ describe("unsupported-api", () => {
assert.isFunction(api.FlatESLint);
});

it("should have LegacyESLint exposed", () => {
assert.isFunction(api.LegacyESLint);
});

it("should not have ESLint exposed", () => {
assert.isUndefined(api.ESLint);
});

it("should have shouldUseFlatConfig exposed", () => {
assert.isFunction(api.shouldUseFlatConfig);
});
Expand Down

0 comments on commit e7368d1

Please sign in to comment.