← All rulesCommentsComment qualitycomments/no-useless-commentsCopy pageView MarkdownDownload .mdOrdinary comments should add context instead of restating straightforward code, adding generic headings, or narrating obvious actions.noisemaintenancerestatement01 Examples Reported Accepted TypeScript// Increment count. count += 1;FindingDisallow comments with no maintenance value.02 Enable itSetupInstall the package, register its plugin factory, then enable the rule.Install the packagepnpm add -D @scruple/commentsRegister 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-useless-comments": "warn"CopyPackage@scruple/commentsDefault threshold0.9Minimum confidence0.7
comments/no-useless-comments
Ordinary comments should add context instead of restating straightforward code, adding generic headings, or narrating obvious actions.
Disallow comments with no maintenance value.
Setup
Install the package, register its plugin factory, then enable the rule.
Install the package
Register the plugin
In
scruple.config.ts, register the factory under thecommentsnamespace used by the rule ID.Enable the rule
"comments/no-useless-comments": "warn"@scruple/comments