---
title: "format/comments/single-line-style"
pagination: false
---

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

<RuleId id="format/comments/single-line-style" />

In the [`format-laravel`](/docs/rules/presets/format-laravel) preset. Safe fix.

## What it does

Single-line comments and multi-line comments with only one line of actual content should use the `//` syntax.

## Configuration

```toml title="pun.toml"
[format.rules]
"comments/single-line-style" = true
```

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

## Options

| Name | Type | Allowed values | Default | Upstream name |
| --- | --- | --- | --- | --- |
| `comment-types` | `list` | `asterisk`, `hash` | `["asterisk", "hash"]` | `comment_types` |

## Replaces

- [`single_line_comment_style`](https://cs.symfony.com/doc/rules/comment/single_line_comment_style.html) (php-cs-fixer)
- [`no-hash-comment`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-hash-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)
