# Is @eslint/core ESM-only? Can you require() it?

> @eslint/core@1.2.1 has no importable main entry. No JavaScript entry point.

Runtime-agnostic core of ESLint

Last verified Sep 9, 2026 against @eslint/core@1.2.1.

@eslint/core does not expose a JavaScript entry point in package.json. It is likely a CLI, a stylesheet, a type-definition package, or an asset bundle, so require() and import are not the way to use it.

## What to do

1. Do not require() or import @eslint/core: it has no JavaScript entry point. Use it as a CLI (npx @eslint/core), a stylesheet, an asset, or a type-definition package as its README describes.
2. TypeScript: types are bundled; install nothing extra.

## Facts

- Latest: 1.2.1 (Apr 8, 2026)
- Module format: No JS entry point
- Last CommonJS version: n/a
- TypeScript types: bundled
- Node engines: ^20.19.0 || ^22.13.0 || >=24
- Weekly downloads: 106.3M
- License: Apache-2.0

## Runtime test results for @eslint/core@1.2.1

Installed and executed on Sep 9, 2026 with require("@eslint/core") from a CommonJS file and import "@eslint/core" from an ES module.

| Runtime | require("@eslint/core") | import "@eslint/core" |
|---|---|---|
| Node.js 18 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Node.js 20 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Node.js 22 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Node.js 24 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Node.js 26 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) |
| Bun 1.4.0 | fails (Error) | fails (Error) |

## How to import @eslint/core

ES modules:

```js
import * as core from "@eslint/core";
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (26 versions; the newest 26 shown).

| Versions | Format | First published |
|---|---|---|
| 0.1.0 – 1.2.1 | No JS entry point | Jun 26, 2024 |

## Frequently asked

**Is @eslint/core ESM-only?**

@eslint/core@1.2.1 has no importable main entry. @eslint/core does not expose a JavaScript entry point in package.json. It is likely a CLI, a stylesheet, a type-definition package, or an asset bundle, so require() and import are not the way to use it.

**Does @eslint/core work in Bun?**

Importing @eslint/core failed in Bun 1.4.0 on Sep 9, 2026: error: Cannot find module '@eslint/core' from '/Users/boat/Projects/top-seo/data/probe-work/@eslint__core/imp.mjs'

**Does @eslint/core ship TypeScript types?**

Yes. @eslint/core bundles its own type declarations; no @types package is needed.

## Links

- [@eslint/core on npm](https://www.npmjs.com/package/@eslint/core)
- [Source repository](https://github.com/eslint/rewrite)
- [HTML version](https://canirequire.com/package/@eslint/core/)
- [JSON version](https://canirequire.com/package/@eslint/core.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
