---
title: "format/statements/numeric-literal-separator"
pagination: false
---

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

<RuleId id="format/statements/numeric-literal-separator" />

Not in any preset. Safe fix.

## What it does

Adds separators to numeric literals of any kind.

## Configuration

```toml title="pun.toml"
[format.rules]
"statements/numeric-literal-separator" = 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 |
| --- | --- | --- | --- | --- |
| `override-existing` | `bool` | Any | `false` | `override_existing` |
| `strategy` | `enum` | `use-separator`, `no-separator` | `"use-separator"` | `strategy` |

## Replaces

- [`numeric_literal_separator`](https://cs.symfony.com/doc/rules/basic/numeric_literal_separator.html) (php-cs-fixer)
- [`readable-literal`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#readable-literal) (mago-linter)

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