---
title: "format/comments/no-empty"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="format/comments/no-empty" />

Not in any preset. Safe fix.

## What it does

There should not be any empty comments.

## Configuration

```toml title="pun.toml"
[format.rules]
"comments/no-empty" = true
```

To skip it in some files, add a [`@pun-ignore-file`](/docs/configuration/ignore-comments) comment.

## Replaces

- [`no_empty_comment`](https://cs.symfony.com/doc/rules/comment/no_empty_comment.html) (php-cs-fixer)
- [`no-empty-comment`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-empty-comment) (mago-linter)

[More format/comments rules](/docs/rules/format/comments) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
