Skip to main content
aislop does not ban comments. It bans comments that make code noisier without adding information. Keep comments that explain a non-obvious constraint, an external workaround, a data contract, or an invariant the type system cannot express. Delete comments that repeat nearby code.

Decision tree

Run every comment through this checklist before keeping it.
1

Check the name first

If the function, variable, or file name already says what the comment says, delete the comment. Rename the symbol if the name is weak.
2

Delete what-comments

Comments that describe what the next line does are usually redundant. The code is already the source of truth for what happens.
3

Keep why-comments

Keep short notes that explain a non-obvious reason: a third-party bug, a protocol constraint, a compatibility workaround, or an invariant reviewers cannot infer locally.

Bad and good examples

Trivial restatement

Bad:
Good:
The name already says what the comment says.

Narrative JSDoc

Bad:
Good:
The first block restates the function. The second carries a contract that editors and callers can use.

Decorative separators

Bad:
Good:
If a file needs section banners to stay readable, split it into smaller files.

Phase headers

Bad:
Good:
Whitespace already groups the steps.

JSDoc that earns its place

Keep JSDoc when it has machine-readable value or explains a public contract. Delete JSDoc that summarizes an internal helper, repeats parameter names, or narrates implementation steps.

Rules involved

Run:
The fixer removes comments that are mechanically safe to delete and verifies the file still parses before writing the result.