---
title: "lint/functions/no-void-reference-return"
pagination: false
---

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

<RuleId id="lint/functions/no-void-reference-return" />

In the [`modernize`](/docs/rules/sets/modernize) set. Report only.

## What it does

Detects functions, methods, closures, arrow functions, and set property hooks that return by reference from a void function.

## Configuration

```toml title="pun.toml"
[lint.rules]
"functions/no-void-reference-return" = "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

- [`no-void-reference-return`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-void-reference-return) (mago-linter)

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