---
title: "format/operators/linebreak"
pagination: false
---

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

<RuleId id="format/operators/linebreak" />

Not in any preset. Safe fix.

## What it does

Operators - when multiline - must always be at the beginning or at the end of the line.

## Configuration

```toml title="pun.toml"
[format.rules]
"operators/linebreak" = 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 |
| --- | --- | --- | --- | --- |
| `only-booleans` | `bool` | Any | `false` | `only_booleans` |
| `position` | `enum` | `beginning`, `end` | `"beginning"` | `position` |

## Replaces

- [`operator_linebreak`](https://cs.symfony.com/doc/rules/operator/operator_linebreak.html) (php-cs-fixer)

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