---
title: "lint/classes/no-protected-constant-in-final"
pagination: false
---

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

<RuleId id="lint/classes/no-protected-constant-in-final" />

In the [`privatization`](/docs/rules/sets/privatization) set. Safe fix.

## What it does

Change protected constant to private if possible

## Configuration

```toml title="pun.toml"
[lint.rules]
"classes/no-protected-constant-in-final" = "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

- [`PrivatizeFinalClassConstant`](https://getrector.com/rule-detail/privatize-final-class-constant-rector) (rector)

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