canirequire › Dual (CommonJS + ESM) › @eslint/config-array
Is @eslint/config-array ESM-only? Can you require() it?
General purpose glob-based configuration matching.
Last verified Sep 9, 2026 against @eslint/config-array@0.23.5. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
@eslint/config-array publishes both a CommonJS entry and a native ESM entry (ESM added in 0.15.1). require("@eslint/config-array") and import "@eslint/config-array" both work on every supported Node.js version and in Bun.
Does @eslint/config-array@0.23.5 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@eslint/config-array") from a CommonJS file and import "@eslint/config-array" from an ES module.
| Runtime | require("@eslint/config-array") | import "@eslint/config-array" |
|---|---|---|
| Node.js 18 | ✓ works | ✓ works |
| Node.js 20 | ✓ works | ✓ works |
| Node.js 22 | ✓ works | ✓ works |
| Node.js 24 | ✓ works | ✓ works |
| Node.js 26 | ✓ works | ✓ works |
| Bun 1.4 | ✓ works | ✓ works |
How to import @eslint/config-array
ES modules (import)
import configArray from "@eslint/config-array";CommonJS (require)
const configArray = require("@eslint/config-array");Module format by version
Derived from the type, main and exports fields of every stable release on npm (20 versions; the newest 20 shown).
| Versions | Format | First published |
|---|---|---|
| 0.15.1 – 0.23.5 | Dual (CommonJS + ESM) | May 30, 2024 |
Frequently asked
Is @eslint/config-array ESM-only?
@eslint/config-array@0.23.5 ships CommonJS and ESM builds. @eslint/config-array publishes both a CommonJS entry and a native ESM entry (ESM added in 0.15.1). require("@eslint/config-array") and import "@eslint/config-array" both work on every supported Node.js version and in Bun.
Can I require @eslint/config-array?
Yes. @eslint/config-array ships a CommonJS entry, so require("@eslint/config-array") works on every Node.js version, alongside the native ESM entry for import.
Does @eslint/config-array work in Bun?
Yes. import "@eslint/config-array" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does @eslint/config-array ship TypeScript types?
Yes. @eslint/config-array 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
- @rollup/rollup-linux-x64-musl 4.63.1CommonJS
- @typescript-eslint/scope-manager 8.70.0CommonJS
- @typescript-eslint/project-service 8.70.0CommonJS
- @nodelib/fs.scandir 4.0.1CommonJS
- @nodelib/fs.stat 4.0.0CommonJS
- @babel/helper-globals 8.0.0CommonJS
- @opentelemetry/semantic-conventions 1.43.0CommonJS
- @typescript-eslint/utils 8.70.0CommonJS