Reports duplicate conditions in if-else-if chains that make code unreachable.
✅ This rule is included in the ts logical and logicalStrict presets.
When an if-else-if chain contains duplicate conditions, the branch with the duplicate condition will never execute.
This is because the earlier identical condition will always be evaluated first and match when true, preventing the duplicate condition from ever being reached.
Duplicate conditions typically indicate a copy-paste error or a logic mistake in the code.
AE53 (statuAE=<==sp ansty="le--0:#D6DEEB;--1:#403F">5==sp><3 sp ansty="le--0:#D9F5DD;--1:#1111">13 sp><1"sp ansty="le--0:#ECC48D;--1:#984E">4Dpendi1"sp>1<1"sp ansty="le--0:#D6DEEB;--1:#403F">53)1"sp>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0handlePendi sp>53( {d><);d ivclassNa="meec-li">53<} sp ansty="le--0:#C792EA;--1:#8844">AEel} sp>5<3 sp ansty="le--0:#C792EA;--1:#8844">AE3 sp>53 (statuAE=<==sp ansty="le--0:#D6DEEB;--1:#403F">5==sp><3 sp ansty="le--0:#D9F5DD;--1:#1111">13 sp><1"sp ansty="le--0:#ECC48D;--1:#984E">4Dacti1"sp>1<1"sp ansty="le--0:#D6DEEB;--1:#403F">53)1"sp>);d>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0handleActi sp>53( {d><);d ivclassNa="meec-li">53<} sp ansty="le--0:#C792EA;--1:#8844">AEel} sp>5<3 sp ansty="le--0:#C792EA;--1:#8844">AE3 sp>53 (statuAE=<==sp ansty="le--0:#D6DEEB;--1:#403F">5==sp><3 sp ansty="le--0:#D9F5DD;--1:#1111">13 sp><1"sp ansty="le--0:#ECC48D;--1:#984E">4Dpendi1"sp>1<1"sp ansty="le--0:#D6DEEB;--1:#403F">53)1"sp>);d>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0handlePendingAga sp>53( {d><);d ivclassNa="meec-li">5);d><3}d ivclassNa="meco"><}d>}d>3}d>AE53 (isValiAE<&&sp ansty="le--0:#D6DEEB;--1:#403F">53 isActive)&&sp>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0processVal sp>53( {d><);d ivclassNa="meec-li">53<} sp ansty="le--0:#C792EA;--1:#8844">AEel} sp>5<3 sp ansty="le--0:#C792EA;--1:#8844">AE3 sp>53 (isPending));d>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0processPendi sp>53( {d><);d ivclassNa="meec-li">53<} sp ansty="le--0:#C792EA;--1:#8844">AEel} sp>5<3 sp ansty="le--0:#C792EA;--1:#8844">AE3 sp>53 (isValiAE<&&sp ansty="le--0:#D6DEEB;--1:#403F">53 isActive)&&sp>);d>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0processValidAga sp>53( {d><);d ivclassNa="meec-li">5);d><3}d ivclassNa="meco"><}d>}d>3}d>AE53 (counAE=<==sp ansty="le--0:#D6DEEB;--1:#403F">5==sp><3 sp ansty="le--0:#F78C6C;--1:#AA09">83 sp><21sp ansty="le--0:#D6DEEB;--1:#403F">53)21sp>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0handleO sp>53( {d><);d ivclassNa="meec-li">53<} sp ansty="le--0:#C792EA;--1:#8844">AEel} sp>5<3 sp ansty="le--0:#C792EA;--1:#8844">AE3 sp>53 (counAE=<==sp ansty="le--0:#D6DEEB;--1:#403F">5==sp><3 sp ansty="le--0:#F78C6C;--1:#AA09">83 sp><22sp ansty="le--0:#D6DEEB;--1:#403F">53)22sp>);d>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0handleT sp>53( {d><);d ivclassNa="meec-li">53<} sp ansty="le--0:#C792EA;--1:#8844">AEel} sp>5<3 sp ansty="le--0:#C792EA;--1:#8844">AE3 sp>53 (counAE=<==sp ansty="le--0:#D6DEEB;--1:#403F">5==sp><3 sp ansty="le--0:#F78C6C;--1:#AA09">83 sp><21sp ansty="le--0:#D6DEEB;--1:#403F">53)21sp>);d>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0handleOneAga sp>53( {d><);d ivclassNa="meec-li">5);d><3}d ivclassNa="meco"><}d>}d>3}d> 443F53 (sta44A31<111" spans="tyle--0:#ECC48D;--1:#98">4E4Dpen111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F5111"><3) {divclass="Nameec-">de61B0handlePen3F53) ><3() ;divclass="Nameec-">3F<53} spans="tyle--0:#C792EA;--1:#88">44AE53} >3443F53 (sta44A31<111" spans="tyle--0:#ECC48D;--1:#98">4E4Dac111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F5111">3()><3) {divclass="Nameec-">de61B0handleAc3F53) ><3() ;divclass="Nameec-">3F<53} spans="tyle--0:#C792EA;--1:#88">44AE53} >3443F53 (sta44A31<111" spans="tyle--0:#ECC48D;--1:#98">4E4Dcompl111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F5111">3()><3) {divclass="Nameec-">de61B0handleCompl3F53) ><3() ;divclass="Nameec-">33()><);>);><}di vdivclass="Nameexpressive-">443F53 (isVa443F53 isActivde61B0processV3F5<3() ;divclass="Nameec-">3F<53} spans="tyle--0:#C792EA;--1:#88">44AE53} >3443F53 (isPendin3()>de61B0processPen3F5<3() ;divclass="Nameec-">3F<53} spans="tyle--0:#C792EA;--1:#88">44AE53} >3443F53 (isVa4434<4AE! spans="tyle--0:#D6DEEB;--1:#40">3F53isActiv4AE!>3()>de61B0processInac3F5<3() ;divclass="Nameec-">33()><);>);>}di><}di vdivclass="Nameexpressive-">443F53 (co44A30<9821 spans="tyle--0:#D6DEEB;--1:#40">3F59821><3) {divclass="Nameec-">de61B0handl3F53) ><3() ;divclass="Nameec-">3F<53} spans="tyle--0:#C792EA;--1:#88">44AE53} >3443F53 (co44A30<9822 spans="tyle--0:#D6DEEB;--1:#40">3F59822>3()><3) {divclass="Nameec-">de61B0handl3F53) ><3() ;divclass="Nameec-">3F<53} spans="tyle--0:#C792EA;--1:#88">44AE53} >3443F53 (co44A30<9823 spans="tyle--0:#D6DEEB;--1:#40">3F59823>3()><3) {divclass="Nameec-">de61B0handleT3F53) ><3() ;divclass="Nameec-">33()><);>);>}di>
This rule is not configurable.
If your project intentionally uses patterns that look like duplicate conditions but actually modify state behind-the-scenes, you might not want to enable this rule.
For example, projects that modify state in computed object get() properties or use Proxy are often considered overly difficult to reason about for both humans and lint rules.