---
title: "format/imports/no-leading-namespace-whitespace"
pagination: false
---

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

<RuleId id="format/imports/no-leading-namespace-whitespace" />

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

## What it does

The namespace declaration line shouldn't contain leading whitespace.

## Configuration

```toml title="pun.toml"
[format.rules]
"imports/no-leading-namespace-whitespace" = true
```

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

## Replaces

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

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