Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The Wilson Else is an experimental linting proposal for one narrow kind of branch: a nested if whose true path does work and then continues without an else. Its purpose is to make reviewers ask whether the unhandled false path is intentionally inactive or represents a missed decision—not to declare every missing else a bug. Regis Wilson introduced it as an experiment, not an established rule.

What the Wilson Else is meant to catch

Wilson’s proposed rule focuses on nested, non-terminating conditionals. If a true branch performs work and then falls through, the reviewer has to infer what the false branch means. In code that changes state or triggers side effects, that inference can matter: the omitted path might intentionally do nothing, or the code might be missing an action.

The guiding idea is that a meaningful branch should do one of three things: handle the alternative, exit before that alternative matters, or explicitly acknowledge that no action is intended. The suggested review comment, “Check your unrealized else here,” is proposed language, not established industry terminology.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why a missing else is not automatically a problem

A blanket rule that flags every if without an else would catch many clear and idiomatic patterns. The Wilson Else is narrower because the shape of the code affects whether an omitted path is worth discussing.

#1 Best Overall
The Lion Does Not Concern Himself Yellow Code Linter Hardcover Journal, Black
  • Witty programming meme graphic pairing a majestic lion portrait with developer linter humor for software engineers and coders.
  • Artistic linocut tech aesthetic suited for hackathons, tech conferences, remote work desks, and everyday programmer casual wear.
  • Hardcover journal with 240 line-ruled pages (120 sheets)
  • Built-in elastic closure and ribbon bookmark
  • Includes an expandable inner storage pocket and a pen holder

Guard clauses already dispose of the other path

A condition that returns or throws ends that path. The code that follows is the valid continuation, so an empty else would add ceremony rather than clarify a decision.

One-sided operations can be self-explanatory

Conditional accumulation or formatting may simply add something when a condition is true and otherwise leave the value unchanged. That behavior can be clear without spelling out an empty alternative.

An existing else already makes the alternative visible

The proposal does not target an if that already has an else. It also treats an else if chain as one decision rather than treating each link as a separate missing-branch finding.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How the prototype narrows its scope

Wilson’s experimental implementation is described as ignoring ordinary unnested if statements, terminating guard clauses, and conditionals with an existing else. It reports nested conditionals that fall through without one. The prototype offers an autofix that inserts an else containing // TODO: nothing.

The article also shows a TypeScript-oriented ESLint configuration using mode: 'nested' and disabling an optional conditional-logging check. These are prototype details, not guarantees of ESLint itself or of a mature, independently validated package. The available account does not establish compatibility across projects or the accuracy of the prototype’s control-flow analysis.

Where an explicit false path may help reviewers

The proposal is aimed at stateful or side-effecting code where doing nothing can be an operational choice. Examples include authorization, deployment orchestration, cloud cleanup, schema generation, state machines, workflow transitions, billing, and security-sensitive routing. In those settings, a reviewer may want to know whether the alternative state was considered, even if the final answer is “no action.”

An explicit branch can give the reviewer something concrete to challenge. But an autofix cannot establish that a person considered the false path. A // TODO: nothing marker might prompt a useful decision—or become empty boilerplate that stays in the code indefinitely. The team still has to choose among leaving an intentional no-op, implementing the alternative, restructuring as a guard clause, or using an exhaustive transition model where appropriate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the proposal does not establish

Nesting is a convenient filter, not a reliable measure of risk. A nested pure transformation can be harmless, while an unnested conditional that mutates production infrastructure can be consequential. A rule that determines whether a branch terminates also needs to understand the language’s control flow; a simple syntactic heuristic can miss indirect or language-specific behavior.

Wilson treats conditional logging as a separate, related concern. Logging-level policy often belongs in logger configuration, while a condition can be appropriate when it determines whether an event itself is noteworthy. The prototype’s limited syntactic heuristic should not be assumed to recognize every logging API or distinguish every semantic case.

No measured precision, recall, defect-prevention result, or completed evaluation is reported. The proposal is therefore best judged as a review aid to test locally, not as evidence that a missing else predicts a defect. Wilson describes it as an experiment rather than a law.

How to evaluate it without turning findings into noise

  1. Start in report-only mode. Run the rule against representative platform or application code without making findings blocking.
  2. Classify each report. Mark it as harmless accumulation, intentional no-op, unclear intent, or a genuine defect.
  3. Look for the useful signal. Check whether nesting, side effects, mutation, or a particular domain best explains findings that led to a better review decision.
  4. Refine or drop the rule. Keep it only if the reports improve decisions enough to justify the review burden; do not treat the presence of an else as proof that the branch was understood.

This evaluation is a suggested approach, not a reported result. The central question is whether making these omitted paths visible produces actionable conversations in a particular codebase.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 1
The Lion Does Not Concern Himself Yellow Code Linter Hardcover Journal, Black
The Lion Does Not Concern Himself Yellow Code Linter Hardcover Journal, Black
Hardcover journal with 240 line-ruled pages (120 sheets); Built-in elastic closure and ribbon bookmark
$16.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.