canirequire › Dual (CommonJS + ESM) › @eslint/eslintrc
Is @eslint/eslintrc ESM-only? Can you require() it?
The legacy ESLintRC config file format for ESLint
Last verified Sep 9, 2026 against @eslint/eslintrc@3.3.7. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
@eslint/eslintrc publishes both a CommonJS entry and a native ESM entry (ESM added in 1.0.0). require("@eslint/eslintrc") and import "@eslint/eslintrc" both work on every supported Node.js version and in Bun.
Does @eslint/eslintrc@3.3.7 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@eslint/eslintrc") from a CommonJS file and import "@eslint/eslintrc" from an ES module.
| Runtime | require("@eslint/eslintrc") | import "@eslint/eslintrc" |
|---|---|---|
| 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/eslintrc
ES modules (import)
import eslintrc from "@eslint/eslintrc";CommonJS (require)
const eslintrc = require("@eslint/eslintrc");Module format by version
Derived from the type, main and exports fields of every stable release on npm (51 versions; the newest 51 shown).
| Versions | Format | First published |
|---|---|---|
| 1.0.0 – 3.3.7 | Dual (CommonJS + ESM) | Aug 7, 2021 |
| 0.0.1 – 0.4.3 | CommonJS | Sep 1, 2020 |
Frequently asked
Is @eslint/eslintrc ESM-only?
@eslint/eslintrc@3.3.7 ships CommonJS and ESM builds. @eslint/eslintrc publishes both a CommonJS entry and a native ESM entry (ESM added in 1.0.0). require("@eslint/eslintrc") and import "@eslint/eslintrc" both work on every supported Node.js version and in Bun.
Can I require @eslint/eslintrc?
Yes. @eslint/eslintrc ships a CommonJS entry, so require("@eslint/eslintrc") works on every Node.js version, alongside the native ESM entry for import.
Does @eslint/eslintrc work in Bun?
Yes. import "@eslint/eslintrc" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does @eslint/eslintrc ship TypeScript types?
Yes. @eslint/eslintrc 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
- @rolldown/pluginutils 1.0.1ESM-only
- @eslint/js 10.0.1CommonJS
- @eslint-community/regexpp 4.12.2Dual
- @opentelemetry/core 2.11.0CommonJS
- @smithy/is-array-buffer 4.5.2CommonJS
- @typescript-eslint/types 8.70.0CommonJS
- @smithy/util-buffer-from 4.5.2CommonJS
- @radix-ui/react-context 1.2.2Dual