Skip to content
1 min read · 84 words

Type Alias: PeerResolver

ts
type PeerResolver = (peer: string, fromFile: string) => boolean;

Defined in: src/batteries/media/lint.ts:495

The peer-resolution probe: returns true when peer resolves from fromFile. Defaults to Node's resolver anchored at the linted file (so it sees the consumer's node_modules). Exposed as a settable seam so the rule's spec can simulate installed/missing peers without depending on the test runner's own node_modules layout — production never sets it.

Parameters

ParameterType
peerstring
fromFilestring

Returns

boolean