Skip to content

Rule Change: make no-return-await suggestable #16632

@dbartholomae

Description

@dbartholomae

What rule do you want to change?

no-return-await

What change to do you want to make?

Implement autofix

How do you think the change should be implemented?

A new option

Example code

async function foo {
  return await Promise.resolve("bar")
}

What does the rule currently do for this code?

// Error, but don't change:
async function foo {
return await Promise.resolve("bar")
}

What will the rule do after it's changed?

// Fix it
async function foo {
return Promise.resolve("bar")
}

Participation

  • I am willing to submit a pull request to implement this change.

Additional comments

Hi! There have been discussions about whether no-return-await should be a core rule. These are resolved - and, consequently, I would argue that the rule should be auto-fixable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintruleRelates to ESLint's core rules

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions