---
title: "lint/pest/no-only"
pagination: false
---

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

<RuleId id="lint/pest/no-only" />

In the [`coding-style`](/docs/rules/sets/coding-style) set. Unsafe fix: it can change behaviour. Runs when pest is installed.

## What it does

Remove ->only() from Pest tests.

## Configuration

```toml title="pun.toml"
[lint.rules]
"pest/no-only" = "error"
```

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

## Replaces

- [`Pun/no_only`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/) (pun)
- [`RemoveOnly`](https://pestphp.com/docs/rector#content-removeonlyrector) (pest-plugin-rector)
- [`no-only`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-only) (mago-linter)

## Merged rules

These old IDs are now this rule. A config that still names one stops with an error. See [merged rules](/docs/migrate/merged-rules).

- `lint/pest/no-focused-test`

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