canirequire

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. Markdown · JSON

Dual (CommonJS + ESM) Dual package on paper — require() failed in our runtime test

@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.
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

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✗ failsError
Node.js 20✗ failsError✗ failsError
Node.js 22✗ failsError✗ failsError
Node.js 24✗ failsError✗ failsError
Node.js 26✗ failsError✗ failsError
Bun 1.4.0✗ failsError✗ failsError

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 * 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 (require)

// 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, corrected where a runtime test of that version contradicted them (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 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

Other dual (commonjs + esm) packages

Similar popularity