Skip to content
← All rules
CommentsComment quality

comments/no-change-history-comments

Comments should explain current constraints rather than narrate completed changes that belong in version control history.

historymaintenanceprose
TypeScript
// Changed this from 3 to 5 last Tuesday.
const retries = 5;
Finding

Disallow obsolete change narration.

Setup

Install the package, register its plugin factory, then enable the rule.

Install the package

pnpm add -D @scruple/comments

Register the plugin

In scruple.config.ts, register the factory under the comments namespace used by the rule ID.

import { comments } from "@scruple/comments";

plugins: {
  "comments": comments(),
},

Enable the rule

"comments/no-change-history-comments": "warn"
Package
@scruple/comments
Default threshold
0.95
Minimum confidence
0.7

Released under the MIT License.