---
title: "format/attributes/no-block-spaces"
pagination: false
---

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

<RuleId id="format/attributes/no-block-spaces" />

Not in any preset. Safe fix.

## What it does

Remove spaces before and after the attributes block.

## Configuration

```toml title="pun.toml"
[format.rules]
"attributes/no-block-spaces" = true
```

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

## Replaces

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

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