# eslint-plugin-new-with-error

> Require `throw new Error()` and not `throw Error()`

Latest version **6.0.0** (published 2026-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-new-with-error
pnpm add eslint-plugin-new-with-error
yarn add eslint-plugin-new-with-error
bun add eslint-plugin-new-with-error
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2026-07-20 |
| First published | 2015-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 26 |
| Author | Rich Trott |
| Maintainers | trott |
| Keywords | eslint, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-new-with-error
- Repository: https://github.com/Trott/eslint-plugin-new-with-error
- Homepage: https://github.com/Trott/eslint-plugin-new-with-error#readme
- Issues: https://github.com/Trott/eslint-plugin-new-with-error/issues
- npm.io page: https://npm.io/package/eslint-plugin-new-with-error

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 6.0.0 (latest) — 2026-07-20
- 5.0.0 — 2023-09-21
- 4.0.0 — 2023-03-27
- 3.1.0 — 2021-11-19
- 3.0.0 — 2021-11-18
- 2.0.0 — 2018-06-29
- 1.1.0 — 2015-11-10
- 1.0.1 — 2015-11-10
- 1.0.0 — 2015-11-10

## README

# eslint-plugin-new-with-error
Require `throw new Error()` and not `throw Error()`

* Installation: `npm install eslint-plugin-new-with-error`
* [Documentation](docs/rules/new-with-error.md)

---
_Source: https://npm.io/package/eslint-plugin-new-with-error · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
