Skip to content

Commit 6266819

Browse files
committed
fix for ESLint 9.10.0
1 parent 37b6e41 commit 6266819

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

lib/processor.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@ const { BuiltInEnvironments, commentParser, validatePlugins } =
99
const { createRequire } = require('module');
1010

1111
const requireAsESLint = createRequire(require.resolve('eslint'));
12-
const { Legacy: { environments: BuiltInEnvironments } } = require('@eslint/eslintrc/universal');
13-
const ConfigCommentParser = requireAsESLint('./linter/config-comment-parser');
12+
const { Legacy: { environments: BuiltInEnvironments } } =
13+
requireAsESLint('@eslint/eslintrc/universal');
14+
let ConfigCommentParser;
15+
try
16+
{
17+
ConfigCommentParser = requireAsESLint('./linter/config-comment-parser');
18+
}
19+
catch
20+
{
21+
({ ConfigCommentParser } = requireAsESLint('@eslint/plugin-kit'));
22+
}
1423
const { flatConfigSchema: { plugins: { validate: validatePlugins } } } =
1524
requireAsESLint('./config/flat-config-schema');
1625
const commentParser = new ConfigCommentParser();

0 commit comments

Comments
 (0)