canirequire

canirequireDual (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.

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
License
MIT

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.

Runtimerequire("@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).

VersionsFormatFirst published
1.16.0 – 1.16.1Dual (CommonJS + ESM)Feb 19, 2026
0.0.0 – 1.15.0CommonJSJun 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

Similar popularity