---
url: https://scruple.dev/rules/comments/no-commented-out-code.md
description: Disallow disabled executable implementation.
---

# comments/no-commented-out-code

Disallow disabled executable implementation.

## What it checks

Remove executable code hidden in comments while retaining legitimate examples, pseudocode, patterns, and data.

## Rule metadata

* Package: `@scruple/comments`
* Category: Comment quality
* Tags: dead-code, maintenance, comments
* Default threshold: `0.95`
* Minimum confidence: `0.7`

## Examples

### Reported

```ts
// await legacySave(record);
await save(record);
```

### Accepted

```ts
await save(record);
```
