Skip to content

no-comment-cruft

Flag commented-out code, section-banner comments, and leading file-header comment preambles.

Why

Decorative, narrated, or dead-code comments obscure the constraints and rationale that comments should preserve.

Fix

Delete dead code and narration; express boundaries with named code and retain only comments that explain constraints or intent.

Examples

Before — flagged A comment repeats the statement below
src/counter.ts
// increment the counter
counter += 1;
After — preferred A reference records why the counter changes
src/counter.ts
// increment the counter for PLT-812
counter += 1;