---
title: "lint/style/require-ordered-traits"
pagination: false
---

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

<RuleId id="lint/style/require-ordered-traits" />

Not in any set. Unsafe fix: it can change behaviour.

## What it does

Trait `use` statements must be sorted alphabetically.

## Configuration

```toml title="pun.toml"
[lint.rules]
"style/require-ordered-traits" = "error"
```

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

## Options

| Name | Type | Allowed values | Default | Upstream name |
| --- | --- | --- | --- | --- |
| `case-sensitive` | `bool` | Any | `false` | `case_sensitive` |

## Replaces

- [`ordered_traits`](https://cs.symfony.com/doc/rules/class_notation/ordered_traits.html) (php-cs-fixer, risky)

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