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

lint/dead-code/no-always-true-instanceof

In the dead-code set. Safe fix.

What it does

Remove instanceof checks and assert(instanceof) calls that are always true for the known type.

Configuration

[lint.rules]
"dead-code/no-always-true-instanceof" = "error"

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

Options

Name Type Allowed values Default Upstream name
checks list assert, if ["assert", "if"] None (Pun’s own)

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-always-true-instanceof-assert

More lint/dead-code rules · Edit this page

Last updated on

Was this page helpful?