← All rulesCommentsComment qualitycomments/no-commented-out-codeCopy pageView MarkdownDownload .mdRemove executable code hidden in comments while retaining legitimate examples, pseudocode, patterns, and data.dead-codemaintenancecomments01 Examples Reported Accepted TypeScript// await legacySave(record); await save(record);FindingDisallow disabled executable implementation.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-commented-out-code": "warn"CopyPackage@scruple/commentsDefault threshold0.95Minimum confidence0.7
comments/no-commented-out-code
Remove executable code hidden in comments while retaining legitimate examples, pseudocode, patterns, and data.
Disallow disabled executable implementation.
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-commented-out-code": "warn"@scruple/comments