Skip to content

Commit 157d486

Browse files
authored
chore: drop require in benchmark (#695)
1 parent 00549ff commit 157d486

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Diff for: benchmark/index.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -- ignore
22
/* eslint-disable no-console -- ignore */
3-
import * as Benchmark from "benchmark";
4-
import fs from "fs";
5-
import { parseForESLint } from "../src/index.js";
3+
import Benchmark from "benchmark";
4+
import fs from "node:fs";
5+
import { fileURLToPath } from "node:url";
66
import { parseForESLint as parseOld } from "../node_modules/svelte-eslint-parser/lib/index.js";
7+
import { parseForESLint } from "../src/index.js";
78

89
const contents = `${fs.readFileSync(
9-
require.resolve("../explorer-v2/src/lib/RulesSettings.svelte"),
10+
fileURLToPath(
11+
import.meta.resolve("../explorer-v2/src/lib/RulesSettings.svelte"),
12+
),
1013
"utf-8",
1114
)}// comments`;
1215

0 commit comments

Comments
 (0)