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

benchmark/index.ts

Lines changed: 7 additions & 4 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy