> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# redundant-promise-wrapper

> A new Promise only forwards another promise to resolve and reject.

## What it flags

A `new Promise(...)` whose executor does nothing but forward an existing promise: `new Promise((resolve, reject) => source.then(resolve, reject))`, `source.then(resolve).catch(reject)` or `source.then(resolve)`, as the executor's only statement. The source can be any expression, including a call such as `api.get(url)`. The wrapper adds a layer that does nothing, and a version that forgets `reject` never settles when the inner promise fails.

It stays quiet when the executor does other work (for example `setTimeout(resolve, ms)` or transforming the value before `resolve`), when it has more than one statement, and when `Promise` is imported or declared in the file. An async executor is reported by the reliability rule [async-promise-executor](https://loadwise.mintlify.site/rules/reliability/async-promise-executor.md).

## How to review

Return the inner promise directly, or `await` it inside an async function:

```ts theme={null}
function load(id: string) {
  return fetchUser(id);
}
```

If callers rely on the wrapper to turn a thenable into a native promise, use `Promise.resolve(source)` instead. There is no automatic fix.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "redundant-promise-wrapper": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.