← All rulesCommentsComment correctnesscomments/no-misleading-commentsCopy pageView MarkdownDownload .mdConcrete comment claims should remain consistent with the current behavior visible next to them.accuracymaintenancebehavior01 Examples Reported Accepted TypeScript// Cache for one minute. const ttlMs = 3_600_000;FindingDisallow claims contradicted by visible code.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-misleading-comments": "warn"CopyPackage@scruple/commentsDefault threshold0.85Minimum confidence0.7
comments/no-misleading-comments
Concrete comment claims should remain consistent with the current behavior visible next to them.
Disallow claims contradicted by visible code.
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-misleading-comments": "warn"@scruple/comments