Reports functions with duplicate parameter names in their signatures.
✅ This rule is included in the ts javascript presets.
In JavaScript, duplicate parameter names in function signatures can lead to unexpected behavior.
In strict mode (which TypeScript uses by default), duplicate parameter names are a syntax error.
Even in non-strict mode, only the last parameter with a given name is accessible, making earlier parameters with the same name unreachable.
AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0calculateTot3 sp>1<1(sp ansty="le--1:#403F"><53sp ansty="le--0:#D7DB">E0val53sp>EB<, sp ansty="le--0:#D7DB">E0val, sp>1(sp>1<1)sp ansty="le--0:#D6DEEB;--1:#403F">531)sp>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>53 valuA5<3 sp ansty="le--0:#F78C6C;--1:#AA09">83 sp><22sp ansty="le--0:#D6DEEB;--1:#403F">522sp> {d><3;d ivclassNa="meec-li">53;d><3}d ivclassNa="meco"><}d>}d>3}d>AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0proce3 sp>1<1(sp ansty="le--1:#403F"><53sp ansty="le--0:#D7DB">E0fir53sp>EB<, sp ansty="le--0:#D7DB">E0seco, sp>EB<, sp ansty="le--0:#D7DB">E0fir, sp>1(sp>1<1)sp ansty="le--0:#D6DEEB;--1:#403F">531)sp>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>53 firsA53 secon {d>5<3}d ivclassNa="meco"><}d>}d>3}d>AEconsB0handlAE <= sp ansty="le--0:#D9F5DD;--1:#1111">1= sp><1(sp ansty="le--0:#D7DBE0;--1:#403F">53da1(sp>AE<, sp ansty="le--0:#D7DBE0;--1:#403F">53da, sp>1<1)sp ansty="le--0:#C792EA;--1:#8844">AE =>1)sp>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#D6DEEB;--1:#403F">53conso sp>AB0l53(datA {d>A5<3;d ivclassNa="meco"> { console.log(data);"><};d>};d>3;d> 44AEfunc361B0calculateT1<111( spans="tyle--0:#D7DBE0;--1:#40">3F53v111(>1<111) spans="tyle--0:#D6DEEB;--1:#40">3F111)><53 {divclass="Nameec-">de44AEre3F53 va4<4AE* spans="tyle--0:#D6DEEB;--1:#40">34AE*>0<9822 spans="tyle--0:#D6DEEB;--1:#40">39822>53 >3<2;>2;><}di vdivclass="Nameexpressive-">44AEfunc361B0pro1<111( spans="tyle--1:#40"><3F53 spans="tyle--0:#D7">DBE0f3F53>DEDBE0seDEDBE0t111(>1<111) spans="tyle--0:#D6DEEB;--1:#40">3F111)><53 {divclass="Nameec-">de44AEre3F53 fi4<4AE+ spans="tyle--0:#D6DEEB;--1:#40">3F53 sec4AE+>4<4AE+ spans="tyle--0:#D6DEEB;--1:#40">3F53 th4AE+>53 >3}di><}di vdivclass="Nameexpressive-">44AEco61B0han44A1<111( spans="tyle--0:#D7DBE0;--1:#40">3F53111(>1<111) spans="tyle--0:#C792EA;--1:#88">44AE 111)><=> {divclass="Nameec-">de3F53con4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B4AE.><0log spans="tyle--0:#D6DEEB;--1:#40">3F53(d0log>4=> ><4AE ;divclass="Nameec-">4<4AE} spans="tyle--0:#D6DEEB;--1:#40">34AE}>4AE> { console.log(data)"><;}>;}>}di>
This rule is not configurable.
If your codebase relies on non-standard behavior that involves duplicate argument names (which is highly discouraged), you might choose to disable this rule.
For example, if you target a legacy runtime with non-standard JavaScript semantics, standard practices may not apply to you.