Reports function parameters that are only used in recursive calls.
✅ This rule is included in the ts logical and logicalStrict presets.
Parameters that are only passed through to recursive calls without being used in the function body serve no functional purpose.
This pattern often indicates a mistake where a parameter was intended to be used but is only being forwarded through recursive calls.
Such parameters increase cognitive complexity, may impact performance, and suggest the function is only useful internally for iteration or recursion.
AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0proce3 sp>1<1(sp ansty="le--1:#403F"><53sp ansty="le--0:#D7DB">E0da53sp>EB<, sp ansty="le--0:#D7DB">E0unusedPar, 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">AE sp>53 (daA72leng5<3 sp ansty="le--0:#C792EA;--1:#8844">AE=3 sp><==sp ansty="le--0:#D6DEEB;--1:#403F">5==sp><3 sp ansty="le--0:#F78C6C;--1:#AA09">83 sp><20sp ansty="le--0:#D6DEEB;--1:#403F">53)20sp> {d>< {d ivclassNa="meec-li">nt < sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>5 {d><3;d ivclassNa="meec-li">53< sp ansty="le--0:#D6DEEB;--1:#403F">5 sp>3;d><3}d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0proce sp>53(daAB0sli5<3(sp ansty="le--0:#F78C6C;--1:#AA09">83(sp><21sp ansty="le--0:#D6DEEB;--1:#403F">521sp><3)sp ansty="le--0:#889FB2;--1:#4D66">73)sp>53 unusedParam3}d><);d ivclassNa="meec-li">5);d><3}d ivclassNa="meco"><}d>}d>3}d>AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0traver3 sp>1<1(sp ansty="le--1:#403F"><53sp ansty="le--0:#D7DB">E0no53sp>EB<, sp ansty="le--0:#D7DB">E0dep, 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">AE sp>53< (sp ansty="le--0:#C792EA;--1:#8844">A (sp>53node) {d>< {d ivclassNa="meec-li">nt < sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>5 {d><3;d ivclassNa="meec-li">53< sp ansty="le--0:#D6DEEB;--1:#403F">5 sp>3;d><3}d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0traver sp>53(noA72le753 depth3}d><);d ivclassNa="meec-li">nt< sp ansty="le--0:#82AAFF;--1:#3B61">B0traver sp>53(noA72rig753 depth);d><);d ivclassNa="meec-li">5);d><3}d ivclassNa="meco"><}d>}d>3}d>AEconsB0recurAE <= sp ansty="le--0:#D9F5DD;--1:#1111">1= sp><1(sp ansty="le--0:#D7DBE0;--1:#403F">53val1(sp>1<1)sp ansty="le--0:#C792EA;--1:#8844">AE =>1)sp>< {d ivclassNa="meec-li">AE< sp ansty="le--0:#C792EA;--1:#8844">AEretur sp>B0recur53(valuA {d>A5<3;d ivclassNa="meco"> { return recurse(value);"><};d>};d>3;d> 44AEfunc361B0pro1<111( spans="tyle--0:#D7DBE0;--1:#40">3F53111(>1<111) spans="tyle--0:#D6DEEB;--1:#40">3F111)><53 {divclass="Nameec-">de443F53 (4<4AE. spans="tyle--0:#7FDBCA;--1:#09">6E72le4AE.>344A30<9820 spans="tyle--0:#D6DEEB;--1:#40">3F59820>53 ><3) {divclass="Nameec-">dent< spans="tyle--0:#C792EA;--1:#88">44AEre >33) >3F<53 spans="tyle--0:#D6DEEB;--1:#40">353 >de61B0pro3F53(4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B0s4AE.>30<9821 spans="tyle--0:#D6DEEB;--1:#40">3F59821><3)) ;divclass="Nameec-">33))><);>);><}di vdivclass="Nameexpressive-">44AEfunc361B0trav1<111( spans="tyle--1:#40"><3F53 spans="tyle--0:#D7">DBE03F53>DEDBE0d111(>1<111) spans="tyle--0:#D6DEEB;--1:#40">3F111)><53 {divclass="Nameec-">de443F<53 ( spans="tyle--0:#C792EA;--1:#88">453 (><4AE! spans="tyle--0:#D6DEEB;--1:#40">3F53nod4AE!>53 >dent< spans="tyle--0:#C792EA;--1:#88">44AEre >33F<53 spans="tyle--0:#D6DEEB;--1:#40">353 >3F<53 spans="tyle--0:#D6DEEB;--1:#40">3F53con53 >4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B4AE.><0log spans="tyle--0:#D6DEEB;--1:#40">30log>361B0Dep38<34${ spans="tyle--0:#D6DEEB;--1:#40">3F53d34${>3<834} spans="tyle--0:#D6DEEB;--1:#40">3834}>3F<53) ;divclass="Nameec-">de61B0trav3F53(4<4AE. spans="tyle--0:#7FDBCA;--1:#09">6E724AE.>6<67B, spans="tyle--0:#D6DEEB;--1:#40">3F53 de67B,>4<4AE+ spans="tyle--0:#D6DEEB;--1:#40">34AE+>0<9821 spans="tyle--0:#D6DEEB;--1:#40">3F9821>53)><53) ;divclass="Nameec-">de61B0trav3F53(4<4AE. spans="tyle--0:#7FDBCA;--1:#09">6E72r4AE.>6<67B, spans="tyle--0:#D6DEEB;--1:#40">3F53 de67B,>4<4AE+ spans="tyle--0:#D6DEEB;--1:#40">34AE+>0<9821 spans="tyle--0:#D6DEEB;--1:#40">3F9821>53)><53) ;divclass="Nameec-">353)><);>);>}di><}di vdivclass="Nameexpressive-">44AEfunc361B0facto1<111( spans="tyle--0:#D7DBE0;--1:#40">3111(>1<111) spans="tyle--0:#D6DEEB;--1:#40">3F111)><53 {divclass="Nameec-">de443F53< (n spans="tyle--0:#C792EA;--1:#88">44 (n >30<9821 spans="tyle--0:#D6DEEB;--1:#40">3F59821>53 ><3) {divclass="Nameec-">dent< spans="tyle--0:#C792EA;--1:#88">44AEre >30<9821 spans="tyle--0:#D6DEEB;--1:#40">39821>3) >3F<53 spans="tyle--0:#D6DEEB;--1:#40">353 >de44AEre3F5<3 n spans="tyle--0:#C792EA;--1:#88">43 n ><4AE* spans="tyle--0:#D6DEEB;--1:#40">34AE*>61B0facto3F5<3(n spans="tyle--0:#C792EA;--1:#88">43(n ><4AE- spans="tyle--0:#D6DEEB;--1:#40">34AE->0<9821 spans="tyle--0:#D6DEEB;--1:#40">3F9821><53) ;divclass="Nameec-">353)><);>);>}di>
This rule is not configurable.
This rule might get in your way if you have functions where parameters are intentionally passed through for API consistency or future extensibility, even if they’re not currently used in the function body itself.
Doing so is rare and typically indicates a design issue that should be addressed.
You might consider using Flint disable comments and/or configuration file disables for those specific situations instead of completely disabling this rule.