---
source: crates/oxc_linter/src/tester.rs
expression: no_dupe_else_if
---
  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (a) {}
   ·     ─              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a); else if (a);
   ·     ─            ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (a) {} else {}
   ·     ─              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (a) {} else if (c) {}
   ·     ─                             ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (a) {}
   ·     ─                             ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (c) {} else if (a) {}
   ·     ─                                            ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (b) {}
   ·                    ─              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (b) {} else {}
   ·                    ─              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (c) {} else if (b) {}
   ·                    ─                             ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a); else if (b); else if (c); else if (b); else if (d); else;
   ·                  ─                         ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a); else if (b); else if (c); else if (d); else if (b); else if (e);
   ·                  ─                                      ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (a) {} else if (a) {}
   ·     ─              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (a) {} else if (a) {}
   ·                    ─              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (a) {} else if (b) {} else if (a) {}
   ·     ─                             ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (a) {} else if (b) {} else if (a) {}
   ·                    ─                             ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (a) {} else if (b) {} else if (a) {}
   ·                                   ─                             ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) { if (b) {} } else if (a) {}
   ·     ─                         ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a === 1) {} else if (a === 1) {}
   ·     ───────              ───────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (1 < a) {} else if (1 < a) {}
   ·     ─────              ─────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (true) {} else if (true) {}
   ·     ────              ────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a && b) {} else if (a && b) {}
   ·     ──────              ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a && b || c)  {} else if (a && b || c) {}
   ·     ───────────               ───────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (f(a)) {} else if (f(a)) {}
   ·     ────              ────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a === 1) {} else if (a===1) {}
   ·     ───────              ─────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a === 1) {} else if (a === /* comment */ 1) {}
   ·     ───────              ─────────────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a === 1) {} else if ((a === 1)) {}
   ·     ───────              ─────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b) {} else if (a) {}
   ·     ──────              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b) {} else if (a) {} else if (b) {}
   ·     ──────              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b) {} else if (a) {} else if (b) {}
   ·     ──────                             ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b) {} else if (b || a) {}
   ·     ──────              ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (a || b) {}
   ·     ─                             ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b) {} else if (c || d) {} else if (a || d) {}
   ·     ──────                                  ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if ((a === b && fn(c)) || d) {} else if (fn(c) && a === b) {}
   ·     ───────────────────────              ────────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (a && b) {}
   ·     ─              ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a && b) {} else if (b && a) {}
   ·     ──────              ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a && b) {} else if (a && b && c) {}
   ·     ──────              ───────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || c) {} else if (a && b || c) {}
   ·     ──────              ───────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (c && a || b) {}
   ·     ─                             ───────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (c && (a || b)) {}
   ·     ─                             ─────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b && c) {} else if (d && (a || e && c && b)) {}
   ·     ─                                  ───────────────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b && c) {} else if (b && c && d) {}
   ·     ───────────              ───────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b) {} else if (b && c) {}
   ·     ──────              ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if ((a || b) && c) {}
   ·     ─                             ─────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if ((a && (b || c)) || d) {} else if ((c || b) && e && a) {}
   ·     ────────────────────              ──────────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a && b || b && c) {} else if (a && b && c) {}
   ·     ────────────────              ───────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b && c) {} else if (d && (c && e && b || a)) {}
   ·     ─                                  ───────────────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || (b && (c || d))) {} else if ((d || c) && b) {}
   ·     ────────────────────              ─────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b) {} else if ((b || a) && c) {}
   ·     ──────              ─────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b) {} else if (c) {} else if (d) {} else if (b && (a || c)) {}
   ·     ──────                                            ─────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b || c) {} else if (a || (b && d) || (c && e)) {}
   ·     ───────────              ─────────────────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || (b || c)) {} else if (a || (b && c)) {}
   ·     ─────────────              ─────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || b) {} else if (c) {} else if (d) {} else if ((a || c) && (b || d)) {}
   ·     ──────                                            ────────────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (b) {} else if (c && (a || d && b)) {}
   ·     ─                             ──────────────────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (a || a) {}
   ·     ─              ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || a) {} else if (a || a) {}
   ·     ──────              ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a || a) {} else if (a) {}
   ·     ──────              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a) {} else if (a && a) {}
   ·     ─              ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a && a) {} else if (a && a) {}
   ·     ──────              ──────
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain

  ⚠ eslint(no-dupe-else-if): duplicate conditions in if-else-if chains
   ╭─[no_dupe_else_if.tsx:1:1]
 1 │ if (a && a) {} else if (a) {}
   ·     ──────              ─
   ╰────
  help: This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain


