Skip to content

chore: drop require in benchmark #695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 29, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions benchmark/index.ts
Original file line number Diff line number Diff line change
@@ -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 Benchmark from "benchmark";
import fs from "fs";
import { parseForESLint } from "../src/index.js";
import { parseForESLint as parseOld } from "../node_modules/svelte-eslint-parser/lib/index.js";
import { fileURLToPath } from "node:url";
import path from "node:path";

const dirname = fileURLToPath(new URL(".", import.meta.url));
const contents = `${fs.readFileSync(
require.resolve("../explorer-v2/src/lib/RulesSettings.svelte"),
path.resolve(dirname, "../explorer-v2/src/lib/RulesSettings.svelte"),
"utf-8",
)}// comments`;

Expand Down