Skip to content
← All rules
CommentsComment quality

comments/prefer-concise-comments

Long ordinary comments should be reduced when substantially shorter prose preserves their maintenance value.

verbosityreadabilityprose
TypeScript
// It is important to note that we intentionally retry only once here because another retry is performed by the queue worker upstream.
Finding

Prefer useful but concise comment prose.

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/prefer-concise-comments": "warn"
Package
@scruple/comments
Default threshold
0.9
Minimum confidence
0.65

Released under the MIT License.