---
source: crates/oxc_linter/src/tester.rs
expression: no_return_await
---
  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return await bar();
   ·            ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return await(bar());
   ·            ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (a, await bar());
   ·                ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (a, b, await bar());
   ·                   ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (a && await bar());
   ·                  ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (a && b && await bar());
   ·                       ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (a || await bar());
   ·                  ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (a, b, (c, d, await bar()));
   ·                          ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (a, b, (c && await bar()));
   ·                         ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (await baz(), b, await bar());
   ·                             ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (baz() ? await bar() : b);
   ·                     ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (baz() ? a : await bar());
   ·                         ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (baz() ? (a, await bar()) : b);
   ·                         ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (baz() ? a : (b, await bar()));
   ·                             ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (baz() ? (a && await bar()) : b);
   ·                           ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │     return (baz() ? a : (b && await bar()));
   ·                               ─────
 4 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:1:1]
 1 │ 
 2 │ async () => { return await bar(); }
   ·                      ─────
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:1:1]
 1 │ 
 2 │ async () => await bar()
   ·             ─────
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:1:1]
 1 │ 
 2 │ async () => (a, b, await bar())
   ·                    ─────
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:1:1]
 1 │ 
 2 │ async () => (a && await bar())
   ·                   ─────
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:1:1]
 1 │ 
 2 │ async () => (baz() ? await bar() : b)
   ·                      ─────
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:1:1]
 1 │ 
 2 │ async () => (baz() ? a : (b, await bar()))
   ·                              ─────
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:1:1]
 1 │ 
 2 │ async () => (baz() ? a : (b && await bar()))
   ·                                ─────
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:4:1]
 4 │         if (b) {
 5 │             return await bar();
   ·                    ─────
 6 │         }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:4:1]
 4 │         if (b) {
 5 │             return await bar();
   ·                    ─────
 6 │         }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:3:1]
 3 │ finally {
 4 │ return await bar();
   ·        ─────
 5 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:4:1]
 4 │ catch (e) {
 5 │ return await bar();
   ·        ─────
 6 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:3:1]
 3 │ async function foo() {
 4 │ return await bar();
   ·        ─────
 5 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ try {
 3 │ async () => await bar();
   ·             ─────
 4 │ } catch (e) {}
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:6:1]
 6 │ catch (e) {
 7 │  return await bar();
   ·         ─────
 8 │ }
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │ return await new Promise(resolve => {
   ·        ─────
 4 │ resolve(5);
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async () => {
 3 │ return await (
   ·        ─────
 4 │ foo()
   ╰────
  help: Remove redundant `await`.

  ⚠ eslint(no-return-await): Redundant use of `await` on a return value.
   ╭─[no_return_await.tsx:2:1]
 2 │ async function foo() {
 3 │ return await // Test
   ·        ─────
 4 │ 5;
   ╰────
  help: Remove redundant `await`.


