Reports returning a value with type any from a function.
✅ This rule is included in the ts logical and logicalStrict presets.
Returning values typed as any in TypeScript effectively disables type checking and undermines the safety guarantees of the type system.
This rule prevents functions from returning any, any[], or Promise<any>, as well as from returning generics that contain any in positions where a specific type is expected.
Prefer using more specific or unknown types to maintain strong type safety.
AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0fo3 sp>11<()sp ansty="le--0:#D6DEEB;--1:#403F">53()sp>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>5<3 sp ansty="le--0:#F78C6C;--1:#AA09">83 sp><21sp ansty="le--0:#D6DEEB;--1:#403F">521sp><3 sp ansty="le--0:#C792EA;--1:#8844">AE3 sp>5<3 sp ansty="le--0:#C5E478;--1:#3B61">B0a3 sp>5 {d><3;d ivclassNa="meec-li">53;d><3}d ivclassNa="meec-li">AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0fo3 sp>11<()sp ansty="le--0:#D6DEEB;--1:#403F">53()sp>3}d>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>53 [<] sp ansty="le--0:#C792EA;--1:#8844">AE] sp>5<3 sp ansty="le--0:#C5E478;--1:#3B61">B0a3 sp>53[ {d><];d ivclassNa="meec-li">5];d><3}d ivclassNa="meec-li">AEasy5<3 sp ansty="le--0:#C792EA;--1:#8844">AEfuncti3 sp>5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0fo3 sp>11<()sp ansty="le--0:#D6DEEB;--1:#403F">53()sp>3}d>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>5<3 sp ansty="le--0:#C5E478;--1:#3B61">B0Promi3 sp>AB0resol53({<} sp ansty="le--0:#C792EA;--1:#8844">AE} sp>5<3 sp ansty="le--0:#C5E478;--1:#3B61">B0a3 sp>53 {d><);d ivclassNa="meec-li">5);d><3}d ivclassNa="meec-li">AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0assignabili3 sp>11<()sp ansty="le--0:#7FDBCA;--1:#096E">7()sp><2:sp ansty="le--0:#D6DEEB;--1:#403F">52:sp><3 sp ansty="le--0:#FFCB8B;--1:#1111">11S3 sp>5<3B0stri353>3}d>< {d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>5<3 sp ansty="le--0:#7FDBCA;--1:#096E">72n3 sp>5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0S3 sp>5<3B0a353>( {d><);d ivclassNa="meec-li">5);d><3}d ivclassNa="meco"> { return new Set();"><}d>}d>3}d> 44AEfunc361B011<11() spans="tyle--0:#D6DEEB;--1:#40">3F11()><53 {divclass="Nameec-">de44AEre30<9821 spans="tyle--0:#D6DEEB;--1:#40">39821>53 >344AEfunc361B011<11() spans="tyle--0:#D6DEEB;--1:#40">3F11()><53 {divclass="Nameec-">de44AEre3F5353 >< [] ;divclass="Nameec-">3 []>44AEa344AEfunc361B011<11() spans="tyle--0:#D6DEEB;--1:#40">3F11()><53 {divclass="Nameec-">de44AEre361B0Pro4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B0res4AE.>3F53(53 ><{}) ;divclass="Nameec-">3{})>44AEfunc361B0assignabi11<11() spans="tyle--0:#7FDBCA;--1:#09">611()>3111<1Set spans="tyle--0:#D6DEEB;--1:#40">31Set>61B0st3F5<3> {divclass="Nameec-">de44AEre36E7<2new spans="tyle--0:#D6DEEB;--1:#40">32new>61B<0Set spans="tyle--0:#D6DEEB;--1:#40">30Set>61B0st3F533> ><>() ;divclass="Nameec-">3>()> { return new Set("><);>);>
This rule is not configurable.
If your codebase already contains many any types or areas of unsafe code, enabling this rule may be challenging.
It may be more practical to defer enabling this rule until type safety has been improved in those areas.
You might consider using Flint disable comments and/or configuration file disables for specific cases instead of completely disabling this rule.