# no-process-exit

Rule `node/no-process-exit`. Disallow the use of `process.exit()`

- Source: node
- Technologies: Node.js
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 10M weekly downloads of presets that enable it
- Trend: +17.8% last quarter
- Rank: #893 by reach, #1390 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `n/no-process-exit` | yes | no | package `eslint-plugin-n` | [docs](https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-exit.md) |
| Biome | `nursery/noProcessExit` | no | no | group nursery, since 2.6.0 | [docs](https://biomejs.dev/linter/rules/no-process-exit/) |

## Code examples

### Incorrect: the rule reports this

```js
process.exit(1);
process.exit(0);
```

### Correct: the rule accepts this

```js
Process.exit();
var exit = process.exit;
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { n },
    rules: {
      "n/no-process-exit": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noProcessExit": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Node.js recommended](https://lintradar.dev/presets/n-recommended.md) | ESLint | `eslint-plugin-n` | 11 | 10M | +17.8% |

## Related rules

- [unicorn/no-process-exit](https://lintradar.dev/rules/unicorn/no-process-exit.md): Disallow `process.exit()`.
- [eslint/no-process-exit](https://lintradar.dev/rules/eslint/no-process-exit.md): Disallow the use of `process.exit()`
- [node/hashbang](https://lintradar.dev/rules/node/hashbang.md): Require correct usage of hashbang
- [node/no-extraneous-require](https://lintradar.dev/rules/node/no-extraneous-require.md): Disallow `require()` expressions which import extraneous modules
- [node/no-missing-import](https://lintradar.dev/rules/node/no-missing-import.md): Disallow `import` declarations which import missing modules
- [node/no-missing-require](https://lintradar.dev/rules/node/no-missing-require.md): Disallow `require()` expressions which import missing modules

---

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