Reports async functions that do not use await.
✅ This rule is included in the ts logicalStrict presets.
Functions can be marked as async to allow await expressions used inside of them.
The async keyword adds a small amount of conceptual and runtime overhead.
An async function without await expressions may indicate incomplete implementation or leftover code after refactoring.
This rule reports on any function that is marked as async but neither includes an await nor returns a Promise.
AEasy5<3 sp ansty="le--0:#C792EA;--1:#8844">AEfuncti3 sp>5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0processDa3 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:#D9F5DD;--1:#1111">13(sp><1"sp ansty="le--0:#ECC48D;--1:#984E">4Dprocessi1"sp>1<1"sp ansty="le--0:#D6DEEB;--1:#403F">531"sp> {d><);d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>5<3 sp ansty="le--0:#F78C6C;--1:#AA09">823 sp><42sp ansty="le--0:#D6DEEB;--1:#403F">542sp>);d><3;d ivclassNa="meec-li">53;d><3}d ivclassNa="meco"><}d>}d>3}d>AEconsB0fetchUsAE = asyn11<()sp ansty="le--0:#C792EA;--1:#8844">AE =>()sp>< {d ivclassNa="meec-li">AE< sp ansty="le--0:#C792EA;--1:#8844">AEreturn { name sp><: sp ansty="le--0:#D9F5DD;--1:#1111">1<1"sp ansty="le--0:#ECC48D;--1:#984E">4DAli1"sp>1<1"sp ansty="le--0:#C792EA;--1:#8844">AE 1"sp> {d><};d ivclassNa="meec-li">A5};d><3;d ivclassNa="meco"> { return { name: "Alice" };"><};d>};d>3;d>AEcla5<3 sp ansty="le--0:#FFCB8B;--1:#1111">11DataServi3 sp>53< {d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEasy sp>5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0getDa3 sp>11<()sp ansty="le--0:#D6DEEB;--1:#403F">53()sp> {d>< {d ivclassNa="meec-li">nt < sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>5<3 sp ansty="le--0:#7FDBCA;--1:#096E">72th3 sp>A11cacAB0g5<3(sp ansty="le--0:#D9F5DD;--1:#1111">13(sp><1"sp ansty="le--0:#ECC48D;--1:#984E">4Dda1"sp>1<1"sp ansty="le--0:#D6DEEB;--1:#403F">531"sp> {d><);d ivclassNa="meec-li">53< sp ansty="le--0:#D6DEEB;--1:#403F">5 sp>);d><3}d ivclassNa="meec-li">53}d><3}d ivclassNa="meco"><}d>}d>3}d> 44AEa344AEfunc361B0fetch11<11() spans="tyle--0:#D6DEEB;--1:#40">3F11()><53 {divclass="Nameec-">de44AEco61B0resp44AE = aw61B0f31<111" spans="tyle--0:#ECC48D;--1:#98">4E4D/api/111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F111">53 ><53) ;divclass="Nameec-">de44AEre3F53 resp4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B04AE.>3F553)><3() ;divclass="Nameec-">33()><);>);><}di vdivclass="Nameexpressive-">44AEa344AEfunc361B0processI11<11() spans="tyle--0:#D6DEEB;--1:#40">3F11()><53 {divclass="Nameec-">de44A344AEa3F<53 ( spans="tyle--0:#C792EA;--1:#88">44AEco53 (>61B0- 4
<4AE spans="tyle--0:#7FDBCA;--1:#09">6E4AE ><72of spans="tyle--0:#D6DEEB;--1:#40">3F53 asyncIterabl72of>53 >3F53< spans="tyle--0:#D6DEEB;--1:#40">3F53con >4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B4AE.><0log spans="tyle--0:#D6DEEB;--1:#40">3F53(it0log>3F<53 spans="tyle--0:#D6DEEB;--1:#40">353 >3< }> }>}di><}di vdivclass="Nameexpressive-">44AEa344AEfunc361B0wrapInPro11<11() spans="tyle--0:#7FDBCA;--1:#09">611()>31111Pro361B0nu3F5<3> {divclass="Nameec-">de44AEre361B0Pro4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B0res4AE.>309<8242 spans="tyle--0:#D6DEEB;--1:#40">3F8242>3> ><53) ;divclass="Nameec-">353)> { return Promise.resolve(42"><);>);>}di><}di vdivclass="Nameexpressive-">44AEfunc361B0regularFunc11<11() spans="tyle--0:#D6DEEB;--1:#40">3F11()><53 {divclass="Nameec-">de44AEre309<8242 spans="tyle--0:#D6DEEB;--1:#40">38242>53 >3<2;>2;>}di>
This rule is not configurable.
If you intentionally use async functions without await to ensure thrown errors are wrapped in rejected Promises, you may want to disable this rule.
This pattern can be useful when you want consistent error handling through Promise rejection rather than thrown exceptions.
You might consider using Flint disable comments and/or configuration file disables for those specific situations instead of completely disabling this rule.
Some projects that manually manage their Promises prefer to write functions that return Promises regardless of whether they’re using await.
Additionally, if you are writing prototype code where many functions intentionally can be missing their implementation, this rule may get in your way.