canirequire › Dual (CommonJS + ESM) › @rushstack/eslint-patch
Is @rushstack/eslint-patch ESM-only? Can you require() it?
Enhance ESLint with better support for large scale monorepos
Last verified Sep 9, 2026 against @rushstack/eslint-patch@1.16.1. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
@rushstack/eslint-patch publishes both a CommonJS entry and a native ESM entry (ESM added in 1.16.0). require("@rushstack/eslint-patch") and import "@rushstack/eslint-patch" both work on every supported Node.js version and in Bun.
Does @rushstack/eslint-patch@1.16.1 actually load? Runtime test results
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 | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. |
| Node.js 20 | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. |
| Node.js 22 | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. |
| Node.js 24 | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. |
| Node.js 26 | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. | ✗ failsError: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. |
| Bun 1.4 | ✗ failserror: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. | ✗ failserror: The @rushstack/eslint-patch package does not have a default entry point. See README.md for usage instructions. |
A failing require() on a CommonJS package usually means the package needs a browser/DOM global, a peer dependency, or a native binary that is not available in a bare Node.js process.
How to import @rushstack/eslint-patch
ES modules (import)
import eslintPatch from "@rushstack/eslint-patch";CommonJS (require)
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 ships CommonJS and ESM builds. @rushstack/eslint-patch publishes both a CommonJS entry and a native ESM entry (ESM added in 1.16.0). require("@rushstack/eslint-patch") and import "@rushstack/eslint-patch" both work on every supported Node.js version and in Bun.
Can I require @rushstack/eslint-patch?
Yes. @rushstack/eslint-patch ships a CommonJS entry, so require("@rushstack/eslint-patch") works on every Node.js version, alongside the native ESM entry for import.
Does @rushstack/eslint-patch work in Bun?
Importing @rushstack/eslint-patch failed in Bun 1.4 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
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
Similar popularity
- @vue/compiler-sfc 3.5.42Dual
- @babel/plugin-proposal-decorators 8.0.2ESM-only
- @babel/plugin-proposal-class-properties 7.18.6CommonJS
- @rollup/plugin-node-resolve 16.0.3Dual
- @babel/plugin-proposal-object-rest-spread 7.20.7CommonJS
- @emotion/styled 11.14.1Dual
- @babel/plugin-proposal-optional-chaining 7.21.0CommonJS
- @rollup/plugin-replace 6.0.3Dual