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

Enable an equivalent of no-floating-promises to run as error in every lint run #7888

Closed
ivanlei opened this issue Jun 6, 2023 · 3 comments · Fixed by #8198
Closed

Enable an equivalent of no-floating-promises to run as error in every lint run #7888

ivanlei opened this issue Jun 6, 2023 · 3 comments · Fixed by #8198
Labels
enhancement New feature or request v1_triaged DO NOT USE vaults_triage DO NOT USE

Comments

@ivanlei
Copy link
Contributor

ivanlei commented Jun 6, 2023

What is the Problem Being Solved?

Today no-floating-promises is too slow to run in every lint run in CI or on developer's laptops. This leads to potential issues ala #6000 where manual effort is needed to fix floating promises and it's easy to ship code without fixing things.

Let's get an equivalent tool running all the time.

Description of the Design

Security Considerations

Scaling Considerations

Test Plan

@ivanlei ivanlei added enhancement New feature or request vaults_triage DO NOT USE labels Jun 6, 2023
@turadg
Copy link
Member

turadg commented Jun 6, 2023

Sounds like #5788 TMK there is no equivalent tool to the that linting rule. The problem is not the rule but running eslint with types metadata because of architectural constraints between TS/eslint. Another big perf factor is that we don't have isolation between packages so there's some n-squared extra work.

@turadg
Copy link
Member

turadg commented Jun 6, 2023

It's the type tracking that makes it slow. We could get an imperfect approximate version by handling only the cases that don't require inference. Eg E.when without an error handler and isn't bound to a value.

@ivanlei ivanlei added the v1_triaged DO NOT USE label Jun 26, 2023
@turadg
Copy link
Member

turadg commented Aug 14, 2023

It's no longer too slow. It's now running in every CI. But to get it to "error" level we have to,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1_triaged DO NOT USE vaults_triage DO NOT USE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants