Reports using the arguments object instead of rest parameters.
✅ This rule is included in the ts logical and logicalStrict presets.
The arguments object is an array-like object available in non-arrow functions that contains the values of the arguments passed to the function.
However, it lacks Array methods like map, filter, and forEach, making it inconvenient to work with.
Rest parameters provide a real Array, which is more versatile and easier to use.
AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0s3 sp>11<()sp ansty="le--0:#D6DEEB;--1:#403F">53()sp>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEle sp>53totAE <= sp ansty="le--0:#F78C6C;--1:#AA09">8= sp><20sp ansty="le--0:#D6DEEB;--1:#403F">520sp> {d><3;d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEf sp>53< (sp ansty="le--0:#C792EA;--1:#8844">AEle (sp>5<3isp ansty="le--0:#C792EA;--1:#8844">AE 3isp><= sp ansty="le--0:#F78C6C;--1:#AA09">8= sp><20sp ansty="le--0:#D6DEEB;--1:#403F">53; 20sp>A5<3 sp ansty="le--0:#7FDBCA;--1:#096E">72argumen3 sp>A72leng53;< isp ansty="le--0:#C792EA;--1:#8844">AE isp><++sp ansty="le--0:#D6DEEB;--1:#403F">53)++sp>3;d>< {d ivclassNa="meec-li">53 < sp ansty="le--0:#D6DEEB;--1:#403F">53tota sp>AE<+=sp ansty="le--0:#D6DEEB;--1:#403F">5+=sp><3 sp ansty="le--0:#7FDBCA;--1:#096E">72argumen3 sp>53[i {d><];d ivclassNa="meec-li">53< sp ansty="le--0:#D6DEEB;--1:#403F">5 sp>];d><3}d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>53 tota3}d>5<3}d ivclassNa="meec-li">d3}d>AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0logA3 sp>11<()sp ansty="le--0:#D6DEEB;--1:#403F">53()sp>< {d ivclassNa="meec-li">53< sp ansty="le--0:#D6DEEB;--1:#403F">53conso sp>AB0l5<3(sp ansty="le--0:#7FDBCA;--1:#096E">72argumen3(sp>53 {d><);d ivclassNa="meec-li">5);d><3}d ivclassNa="meco"><}d>}d>3}d> 44AEfunc361B<0sum spans="tyle--0:#D9F5DD;--1:#11">10sum><111( spans="tyle--0:#7FDBCA;--1:#09">6E7111(><2... spans="tyle--0:#D7DBE0;--1:#40">3F53va2...>6361B0nu3F<53[] spans="tyle--0:#D9F5DD;--1:#11">153[]><111) spans="tyle--0:#D6DEEB;--1:#40">3F111)><53 {divclass="Nameec-">de44AEre3F53 va4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B0re4AE.>31<111( spans="tyle--1:#40"><3F53 spans="tyle--0:#D7">DBE0t3F53>DEDBE0v111(>1<111) spans="tyle--0:#D6DEEB;--1:#40">3111)>44 spans="tyle--0:#D6DEEB;--1:#40">3F53 to>4<4AE+ spans="tyle--0:#D6DEEB;--1:#40">3F53 v4AE+>6<67B, spans="tyle--0:#D6DEEB;--1:#40">367B,>0<9820 spans="tyle--0:#D6DEEB;--1:#40">3F9820>53 ><53) ;divclass="Nameec-">353)>c44AEfunc361B0lo1<111( spans="tyle--0:#7FDBCA;--1:#09">6E7111(><2... spans="tyle--0:#D7DBE0;--1:#40">3F53i2...>6361B0unk3F<53[] spans="tyle--0:#D9F5DD;--1:#11">153[]><111) spans="tyle--0:#D6DEEB;--1:#40">3F111)><53 {divclass="Nameec-">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">3F53(ite0log>53 >3 total + value, 0);}function logAll(...items: unknown[]) { console.log(items"><);>);>
This rule is not configurable.
If you need to support environments that don’t have rest parameter syntax, such as ES5 or earlier, you may need to disable this rule.
However, most modern JavaScript environments support rest parameters.