Skip to content

Commit

Permalink
test: improve how to get FlatESLint (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored Mar 9, 2025
1 parent 6f35f1b commit ca5eb3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/prettier.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import eslintMdx from 'eslint-mdx';
const rule = eslintPluginPrettier.rules.prettier;
const RuleTester =
eslintUnsupportedApi.FlatRuleTester ?? eslintPackage.RuleTester;
const ESLint = eslintUnsupportedApi.FlatESLint ?? eslintPackage.ESLint;

// ------------------------------------------------------------------------------
// Tests
Expand Down Expand Up @@ -443,8 +444,6 @@ let eslint;
*/
async function runFixture(pattern, asserts, skip) {
if (!eslint) {
const ESLint = await eslintPackage.loadESLint();

eslint = new ESLint({
overrideConfigFile: true,
overrideConfig: [
Expand Down

0 comments on commit ca5eb3e

Please sign in to comment.