We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
import.meta.resolve
1 parent 282522e commit ce1795dCopy full SHA for ce1795d
benchmark/index.ts
@@ -5,11 +5,11 @@ import fs from "fs";
5
import { parseForESLint } from "../src/index.js";
6
import { parseForESLint as parseOld } from "../node_modules/svelte-eslint-parser/lib/index.js";
7
import { fileURLToPath } from "node:url";
8
-import path from "node:path";
9
10
-const dirname = fileURLToPath(new URL(".", import.meta.url));
11
const contents = `${fs.readFileSync(
12
- path.resolve(dirname, "../explorer-v2/src/lib/RulesSettings.svelte"),
+ fileURLToPath(
+ import.meta.resolve("../explorer-v2/src/lib/RulesSettings.svelte"),
+ ),
13
"utf-8",
14
)}// comments`;
15
0 commit comments