Skip to content

upgrade no-sync-fn-in-async-fn #1198

@sigmaSd

Description

@sigmaSd

currently no-sync-fn-in-async-fn can't catch this:

async function a() {
   b() // b is blocking, but its hidden from us, we only warn if we see Deno. Sync syntax
}

function b() {
 Deno.xxxxxSync()
}

I thought maybe its possible to catch even this: for example we can consider each function that have inside it a deno Sync api a blocking function, and save it on a list and now each time we see it we also consider the parent blocking and so on, and now if we see one of these in an async context we emit a warning.

Do you think this is a reasonable idea ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions