Skip to content

Commit

Permalink
fix: config load on Windows (#538)
Browse files Browse the repository at this point in the history
* fix: fix config load on Windows

* fix: formatting

---------

Co-authored-by: Ari Perkkiö <ari.perkkio@gmail.com>
fisker and AriPerkkio authored Jul 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 9a905c4 commit c2360fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/eslint-remote-tester/src/config/load.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { pathToFileURL } from 'node:url';

/** @internal */
export const loadTSConfig = async (configPath: string) => {
let importx: typeof import('importx') | undefined = undefined;
@@ -37,6 +39,6 @@ export const loadConfig = async (configPath: string) => {
return loadTSConfig(configPath);
}

const { default: config } = await import(configPath);
const { default: config } = await import(pathToFileURL(configPath).href);
return config;
};

0 comments on commit c2360fc

Please sign in to comment.