Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing the useless promise-function-async #10

Open
Mister-Hope opened this issue Aug 19, 2024 · 0 comments
Open

Closing the useless promise-function-async #10

Mister-Hope opened this issue Aug 19, 2024 · 0 comments

Comments

@Mister-Hope
Copy link
Member

Mister-Hope commented Aug 19, 2024

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant