---
title: "format/statements/no-space-before-semicolon"
pagination: false
---

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

<RuleId id="format/statements/no-space-before-semicolon" />

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

## What it does

Single-line whitespace before closing semicolon are prohibited.

## Configuration

```toml title="pun.toml"
[format.rules]
"statements/no-space-before-semicolon" = true
```

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

## Replaces

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

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