# Is @rushstack/eslint-patch ESM-only? Can you require() it?

> @rushstack/eslint-patch@1.16.1 declares CommonJS and ESM builds, but require() fails at runtime. Dual package on paper — require() failed in our runtime test.

Enhance ESLint with better support for large scale monorepos

Last verified Sep 9, 2026 against @rushstack/eslint-patch@1.16.1.

@rushstack/eslint-patch declares both a CommonJS entry and a native ESM entry (ESM added in 1.16.0), but require("@rushstack/eslint-patch") failed on every Node.js version in our probe: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. That usually means a missing peer dependency, a browser-only global, or a package that refuses to be loaded with require(); see the runtime table below.

## What to do

1. require("@rushstack/eslint-patch") failed in our probe on every Node.js version (The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions); check the package README for peer dependencies or setup before relying on it.
2. TypeScript: types are bundled; install nothing extra.

## Facts

- Latest: 1.16.1 (Feb 20, 2026)
- Module format: Dual (CommonJS + ESM)
- Last CommonJS version: 1.16.1
- Native ESM since: 1.16.0
- TypeScript types: bundled
- Node engines: not declared
- Weekly downloads: 10.5M
- License: MIT

## Runtime test results for @rushstack/eslint-patch@1.16.1

Installed and executed on Sep 9, 2026 with require("@rushstack/eslint-patch") from a CommonJS file and import "@rushstack/eslint-patch" from an ES module.

| Runtime | require("@rushstack/eslint-patch") | import "@rushstack/eslint-patch" |
|---|---|---|
| Node.js 18 | fails (Error) | fails (Error) |
| Node.js 20 | fails (Error) | fails (Error) |
| Node.js 22 | fails (Error) | fails (Error) |
| Node.js 24 | fails (Error) | fails (Error) |
| Node.js 26 | fails (Error) | fails (Error) |
| Bun 1.4.0 | fails (Error) | fails (Error) |

## How to import @rushstack/eslint-patch

ES modules:

```js
import * as eslintPatch from "@rushstack/eslint-patch";
```

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS:

```js
// require("@rushstack/eslint-patch") failed in our probe on every Node.js version we test (The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions); see the runtime table.
const eslintPatch = require("@rushstack/eslint-patch");
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (44 versions; the newest 44 shown).

| Versions | Format | First published |
|---|---|---|
| 1.16.0 – 1.16.1 | Dual (CommonJS + ESM) | Feb 19, 2026 |
| 0.0.0 – 1.15.0 | CommonJS | Jun 17, 2020 |

## Frequently asked

**Is @rushstack/eslint-patch ESM-only?**

@rushstack/eslint-patch@1.16.1 declares CommonJS and ESM builds, but require() fails at runtime. @rushstack/eslint-patch declares both a CommonJS entry and a native ESM entry (ESM added in 1.16.0), but require("@rushstack/eslint-patch") failed on every Node.js version in our probe: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. That usually means a missing peer dependency, a browser-only global, or a package that refuses to be loaded with require(); see the runtime table below.

**Can I require @rushstack/eslint-patch?**

Not in practice. @rushstack/eslint-patch declares a CommonJS entry, but require("@rushstack/eslint-patch") failed on every Node.js version in our probe: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. Check the package README for peer dependencies or setup before relying on it.

**Does @rushstack/eslint-patch work in Bun?**

Importing @rushstack/eslint-patch failed in Bun 1.4.0 on Sep 9, 2026: error: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions.

**Does @rushstack/eslint-patch ship TypeScript types?**

Yes. @rushstack/eslint-patch bundles its own type declarations; no @types package is needed.

## Links

- [@rushstack/eslint-patch on npm](https://www.npmjs.com/package/@rushstack/eslint-patch)
- [Source repository](https://github.com/microsoft/rushstack)
- [HTML version](https://canirequire.com/package/@rushstack/eslint-patch/)
- [JSON version](https://canirequire.com/package/@rushstack/eslint-patch.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
