Skip to content

Dead code

Focused command: dead-code

Inspects private unused function declarations. It is narrower than general reachability analysis and does not remove code automatically. Review dynamic invocation, framework conventions, and reflection before acting on a finding.

Before — no in-scope call sites use this private function:

function legacyLabel(value: string): string {
return value.trim();
}

After — after confirming there are no dynamic or framework-driven callers, remove it:

// (no declaration)