feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741)
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user