Skip to content

Closing the useless promise-function-async #10

@Mister-Hope

Description

@Mister-Hope

@typescript-eslint/promise-function-async is useless with the following rules after type checking, and it's improving bundle size.

  • no-floating-promises: This ensures any floating promise being specially marked, so that developers can not make async actions in a sync function by mistake
  • explicit-function-return-type: This ensures that any function is already marked async or sync with "its return type", so that people will not mistakenly use a async function by thinking it sync.

Under this view, the @typescript-eslint/promise-function-async is useless at least seems to me, and could create possible fail positives with the following:

let promise: Promise<void> | null;

const failPositive = () => promise

image

So I am suggesting closing this issue as it has negative influence with output code also no known benifit (at least seems to me)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions