Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

lint/dead-code/no-self-assignment

In the dead-code set. Safe fix. Intent: correctness.

What it does

Detects and removes self-assignments where a variable or property is assigned to itself.

Configuration

[lint.rules]
"dead-code/no-self-assignment" = "error"

To skip it in some files or lines, add an override or an ignore comment.

Replaces

Merged rules

These old IDs are now this rule. A config that still names one stops with an error. See merged rules.

  • lint/dead-code/no-mirror-assignment

More lint/dead-code rules · Edit this page

Last updated on

Was this page helpful?