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

Update return-await mode #285

Open
lishaduck opened this issue Oct 31, 2024 · 1 comment
Open

Update return-await mode #285

lishaduck opened this issue Oct 31, 2024 · 1 comment
Labels
enhancement New feature or request triaging Issue is still being evaluated. PRs not yet accepted.

Comments

@lishaduck
Copy link
Contributor

lishaduck commented Oct 31, 2024

By default, it's set to error-handling-correctness-only, but the docs recommend setting it always or in-try-catch. Personally, I prefer the always style (it's consistent, has better stacktraces, and equal perf1)

Footnotes

  1. Originally, it had worse perf (4 ticks vs 2), but they changed the spec so it's faster (1 tick vs 2), but then changed plain return to also use 1 tick, so perf is moot unless you're targeting older targets.

@lishaduck
Copy link
Contributor Author

Also, I noticed we didn't use stylisticTypeChecked from tseslint. I assume that's because sheriff has it's own opinions?

@AndreaPontrandolfo AndreaPontrandolfo added enhancement New feature or request triaging Issue is still being evaluated. PRs not yet accepted. labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaging Issue is still being evaluated. PRs not yet accepted.
Projects
None yet
Development

No branches or pull requests

2 participants