diff --git a/benchmark/index.ts b/benchmark/index.ts index 6e23c845..38ff0001 100644 --- a/benchmark/index.ts +++ b/benchmark/index.ts @@ -1,12 +1,15 @@ // eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -- ignore /* eslint-disable no-console -- ignore */ -import * as Benchmark from "benchmark"; -import fs from "fs"; -import { parseForESLint } from "../src/index.js"; +import Benchmark from "benchmark"; +import fs from "node:fs"; +import { fileURLToPath } from "node:url"; import { parseForESLint as parseOld } from "../node_modules/svelte-eslint-parser/lib/index.js"; +import { parseForESLint } from "../src/index.js"; const contents = `${fs.readFileSync( - require.resolve("../explorer-v2/src/lib/RulesSettings.svelte"), + fileURLToPath( + import.meta.resolve("../explorer-v2/src/lib/RulesSettings.svelte"), + ), "utf-8", )}// comments`;