---
title: "lint/classes/no-unset-on-property"
pagination: false
---

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

<RuleId id="lint/classes/no-unset-on-property" />

In the [`code-quality`](/docs/rules/sets/code-quality) set. Unsafe fix: it can change behaviour. Intent: suspicious.

## What it does

Properties should be set to `null` instead of using `unset`.

## Configuration

```toml title="pun.toml"
[lint.rules]
"classes/no-unset-on-property" = "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.

## Replaces

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

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