Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const absPath = getAbsolutePath(importee, importer, options);
const caseIgnoredFilename = getCaseIgnoredFilenameMatch(options.files, absPath);
return caseIgnoredFilename
? generateCompilerError(ModuleResolutionErrors.IMPORT_AND_FILE_NAME_CASE_MISMATCH, {
messageArgs: [
importee,
importer,
caseIgnoredFilename.substr(
0,
caseIgnoredFilename.length - path.extname(caseIgnoredFilename).length
),
],
origin: { filename: importer },
})
: generateCompilerError(ModuleResolutionErrors.IMPORTEE_RESOLUTION_FROM_IMPORTER_FAILED, {
messageArgs: [importee, importer, absPath],
origin: { filename: importer },
});
}
const absPath = getAbsolutePath(importee, importer, options);
const caseIgnoredFilename = getCaseIgnoredFilenameMatch(options.files, absPath);
return caseIgnoredFilename
? generateCompilerError(ModuleResolutionErrors.IMPORT_AND_FILE_NAME_CASE_MISMATCH, {
messageArgs: [
importee,
importer,
caseIgnoredFilename.substr(
0,
caseIgnoredFilename.length - path.extname(caseIgnoredFilename).length
),
],
origin: { filename: importer },
})
: generateCompilerError(ModuleResolutionErrors.IMPORTEE_RESOLUTION_FROM_IMPORTER_FAILED, {
messageArgs: [importee, importer, absPath],
origin: { filename: importer },
});
}