---
source: crates/oxc_linter/src/tester.rs
---
  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:18]
 1 │ function foo() { hey.then(x => {}) }
   ·                  ─────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:18]
 1 │ function foo() { hey.then(function() { }).then() }
   ·                  ───────────────────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:18]
 1 │ function foo() { hey.then(function() { }).then() }
   ·                  ────────────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:18]
 1 │ function foo() { hey.then(function() { }).then(x).catch() }
   ·                  ────────────────────────────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:18]
 1 │ function foo() { hey.then(function() { }).then(x).catch() }
   ·                  ────────────────────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:18]
 1 │ function foo() { hey.then(function() { }).then(x).catch() }
   ·                  ────────────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:22]
 1 │ async function a() { hey.then(function() { }).then(function() { }) }
   ·                      ─────────────────────────────────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:22]
 1 │ async function a() { hey.then(function() { }).then(function() { }) }
   ·                      ────────────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:18]
 1 │ function foo() { hey.catch(x => {}) }
   ·                  ──────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:18]
 1 │ function foo() { hey.finally(x => {}) }
   ·                  ────────────────────
   ╰────

  ⚠ eslint-plugin-promise(prefer-await-to-then): Prefer await to then()/catch()/finally()
   ╭─[prefer_await_to_then.tsx:1:1]
 1 │ something().then(async () => await somethingElse())
   · ───────────────────────────────────────────────────
   ╰────
