Function: resolveTool()
function resolveTool(
toolName,
hostCwd,
bundledRequire
): ResolvedTool;
Defined in: resolver.ts:20
Try to resolve a tool (e.g. "eslint") from the host project first; fall back to the bundled copy that ships with the calling detector package.
bundledRequire is created with createRequire(import.meta.url) inside the
detector package, so its resolution lookups start from the detector's own
node_modules tree. Only its resolve is used, so any object with one works.
Parameters
| Parameter | Type |
|---|---|
toolName |
string |
hostCwd |
string |
bundledRequire |
{ resolve: string; } |
bundledRequire.resolve |