diff --git a/markdownlint-cli2.mjs b/markdownlint-cli2.mjs index dd02ca2..6db8cbd 100755 --- a/markdownlint-cli2.mjs +++ b/markdownlint-cli2.mjs @@ -77,7 +77,7 @@ const importModule = async (dirOrDirs, id, noRequire) => { try { let moduleName = null; try { - moduleName = resolveModule(dynamicRequire, expandId, dirs); + moduleName = pathToFileURL(resolveModule(dynamicRequire, expandId, dirs)); } catch { moduleName = // eslint-disable-next-line n/no-unsupported-features/node-builtins