Skip to content

Configs: [return-await] Change default option from in-try-catch to always #10165

Open
@Zamiell

Description

@Zamiell

Before You File a Proposal Please Confirm You Have Done The Following...

Description

In the documentation for the @typescript-eslint/return-await rule, it says that using "in-try-catch" as opposed to "always" is purely a stylistic concern.

However, on this mdn page, it explains in the "Improving stack trace" section that using the "in-try-catch" style results in a worse stack trace. Thus, if true, this is not purely a stylistic concern.

Is this accurate? If so, it seems a compelling reason to use "always" instead of "in-try-catch", and I propose that:

  1. the documentation for the return-await rule should be updated to reflect this and
  2. the default option should be updated for all users of TSESLint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis change will require a new major version to be releasedpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginpreset config changeProposal for an addition, removal, or general change to a preset config

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions