feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741)

This commit is contained in:
Kit Langton
2026-04-15 23:27:32 -04:00
committed by GitHub
parent 343a564183
commit 80f1f1b5b8
103 changed files with 212 additions and 187 deletions

View File

@@ -3,7 +3,7 @@ export function defer<T extends () => void | Promise<void>>(
): T extends () => Promise<void> ? { [Symbol.asyncDispose]: () => Promise<void> } : { [Symbol.dispose]: () => void } {
return {
[Symbol.dispose]() {
fn()
void fn()
},
[Symbol.asyncDispose]() {
return Promise.resolve(fn())

View File

@@ -59,7 +59,7 @@ let write = (msg: any) => {
export async function init(options: Options) {
if (options.level) level = options.level
cleanup(Global.Path.log)
void cleanup(Global.Path.log)
if (options.print) return
logpath = path.join(
Global.Path.log,