Reports calling a function with a value typed as any as an argument.
✅ This rule is included in the ts logical and logicalStrict presets.
Passing a value typed as any as a function argument defeats TypeScript’s type safety guarantees.
The any type bypasses type checking, allowing unexpected types to propagate through your codebase and potentially cause runtime errors.
This rule also detects spreading arrays or tuples with any typed elements as function arguments.
AEdeclare consB0val7<2:sp ansty="le--0:#C792EA;--1:#8844">A2:sp>B0a5<3;d ivclassNa="meec-li">AEdecla5<3 sp ansty="le--0:#C792EA;--1:#8844">AEfuncti3 sp>5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0processStri3 sp>1<1(sp ansty="le--0:#D7DBE0;--1:#403F">53inp1(sp>7<2:sp ansty="le--0:#D6DEEB;--1:#403F">52:sp><3 sp ansty="le--0:#C5E478;--1:#3B61">B0stri3 sp>1<1)sp ansty="le--0:#7FDBCA;--1:#096E">71)sp><2:sp ansty="le--0:#D6DEEB;--1:#403F">52:sp><3 sp ansty="le--0:#C5E478;--1:#3B61">B0vo3 sp>53;d><3;d ivclassNa="meec-li">d3;d>B0processStri53(value<);d ivclassNa="meec-li">d);d>AEdeclare consB0valu7<2:sp ansty="le--0:#C792EA;--1:#8844">A2:sp>B0a53[<];d ivclassNa="meec-li">AEdecla5<3 sp ansty="le--0:#C792EA;--1:#8844">AEfuncti3 sp>5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0logA3 sp>1<1(sp ansty="le--0:#7FDBCA;--1:#096E">72.1(sp><..sp ansty="le--0:#D7DBE0;--1:#403F">53ite7<2:sp ansty="le--0:#D6DEEB;--1:#403F">52:sp><3 sp ansty="le--0:#C5E478;--1:#3B61">B0stri3 sp>53<[]sp ansty="le--0:#D9F5DD;--1:#1111">1[]sp><1)sp ansty="le--0:#7FDBCA;--1:#096E">71)sp><2:sp ansty="le--0:#D6DEEB;--1:#403F">52:sp><3 sp ansty="le--0:#C5E478;--1:#3B61">B0vo3 sp>5];d><3;d ivclassNa="meec-li">d3;d>B0logA5<3(sp ansty="le--0:#7FDBCA;--1:#096E">72.3(sp><..sp ansty="le--0:#D6DEEB;--1:#403F">53values<);d ivclassNa="meco"><);d>);d>);d> 44AEdeclare co61B0v64<4AE spans="tyle--0:#C5E478;--1:#3B">61B0st4AE >344AEdec344AEfunc361B0processSt1<111( spans="tyle--0:#D7DBE0;--1:#40">3F53i111(>6361B0st1<111) spans="tyle--0:#7FDBCA;--1:#09">6111)>361B03c61B0processSt3F53(valc44AEdeclare co61B0va64<4AE spans="tyle--0:#C5E478;--1:#3B">61B0st4AE >3F5<3[] ;divclass="Nameec-">44AEdec344AEfunc361B0lo1<111( spans="tyle--0:#7FDBCA;--1:#09">6E7111(><2... spans="tyle--0:#D7DBE0;--1:#40">3F53i2...>6361B0st3F<53[] spans="tyle--0:#D9F5DD;--1:#11">153[]><111) spans="tyle--0:#7FDBCA;--1:#09">6111)>361B033[]>c61B0lo36E7<2... spans="tyle--0:#D6DEEB;--1:#40">3F53valu2...>c6376// Passing any to unknown is all44AEdec344AEfunc361B0acceptUnk1<111( spans="tyle--0:#D7DBE0;--1:#40">3F53i111(>6361B0unk1<111) spans="tyle--0:#7FDBCA;--1:#09">6111)>361B0344AEdeclare co61B0unsafeV64<4AE spans="tyle--0:#C5E478;--1:#3B">61B4AE ><0any spans="tyle--0:#D6DEEB;--1:#40">30any>61B0acceptUnk3F53(unsafeVal
This rule is not configurable.
If your codebase has many existing any types or areas of unsafe code, it may be difficult to enable this rule.
Consider using Flint disable comments for specific situations while working to improve type safety incrementally.