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

lint/complexity/prefer-simple-condition

In the code-quality and dead-code sets. Safe fix.

What it does

Simplify a negated comparison or a comparison with a boolean

Configuration

[lint.rules]
"complexity/prefer-simple-condition" = "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 conditions, identical-true, not-identical ["conditions", "identical-true", "not-identical"] 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/complexity/no-negated-comparison
  • lint/complexity/no-boolean-literal-compare

More lint/complexity rules · Edit this page

Last updated on

Was this page helpful?