# avoid-new

Rule `promise/avoid-new`. Disallow creating `new` promises outside of utility libs (use [util.promisify][] instead).

- Source: promise
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 2.2M weekly downloads of presets that enable it
- Trend: +137.0% last quarter
- Rank: #1495 by reach, #88 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `promise/avoid-new` | no | no | package `eslint-plugin-promise` | [docs](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/avoid-new.md) |
| Oxlint | `promise/avoid-new` | no | no | plugin `promise`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/promise/avoid-new.html) |

## Code examples

### Incorrect: the rule reports this

```js
function promisifiedFn(arg) {
  return new Promise((resolve, reject) => {
    callbackStyleFn(arg, (error, result) =>
      error ? reject(error) : resolve(result),
    )
  })
}

new Promise((resolve, reject) => resolve(1))
new Promise((resolve, reject) => reject(new Error('oops')))
```

### Correct: the rule accepts this

```js
import util from 'util'
const promisifiedFn = util.promisify(callbackStyleFn)

Promise.resolve(1)
Promise.reject(new Error('oops'))
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import promise from "eslint-plugin-promise";

export default [
  {
    plugins: { promise },
    rules: {
      "promise/avoid-new": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "promise"
  ],
  "rules": {
    "promise/avoid-new": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [promise/no-multiple-resolved](https://lintradar.dev/rules/promise/no-multiple-resolved.md): Disallow creating new promises with paths that resolve multiple times.
- [promise/prefer-catch](https://lintradar.dev/rules/promise/prefer-catch.md): Prefer `catch` to `then(a, b)`/`then(null, b)` for handling errors.
- [promise/prefer-await-to-callbacks](https://lintradar.dev/rules/promise/prefer-await-to-callbacks.md): Prefer `async`/`await` to the callback pattern.
- [promise/spec-only](https://lintradar.dev/rules/promise/spec-only.md): Disallow use of non-standard Promise static methods.
- [promise/prefer-await-to-then](https://lintradar.dev/rules/promise/prefer-await-to-then.md): Prefer `await` to `then()`/`catch()`/`finally()` for reading Promise values.
- [promise/valid-params](https://lintradar.dev/rules/promise/valid-params.md): Enforces the proper number of arguments are passed to Promise functions.

---

Web page: https://lintradar.dev/rules/promise/avoid-new. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
