ESLint Config (eslint-config-eslint)

raw JSON →
14.0.0 verified Sat Apr 25 auth: no javascript

eslint-config-eslint is the official ESLint shareable configuration used by ESLint projects themselves. Version 14.0.0 ships TypeScript types and requires ESLint ^10.0.0 as a peer dependency. Released as part of the ESLint monorepo, it follows ESLint's major release cadence. It provides multiple config presets: default (ESM), CJS, base (for non-Node.js files), and formatting. Unlike generic configs like eslint-config-standard, this config is tailored for internal ESLint development, enforcing strict rules expected in the ESLint codebase. It is not intended for general use unless mirroring ESLint's own style.

error Cannot find module 'eslint-config-eslint'
cause Package not installed or incorrect import path (CommonJS using default instead of /cjs).
fix
npm install eslint-config-eslint -D. If using CommonJS, use require('eslint-config-eslint/cjs').
error Failed to load config "eslint-config-eslint" to extend from.
cause Using legacy .eslintrc format with extends; eslint-config-eslint v14 only supports flat config.
fix
Create eslint.config.js and use import/require as shown in documentation.
error Cannot use import statement outside a module
cause ESM import used in a CommonJS project without type: module.
fix
Set "type": "module" in package.json, or use require('eslint-config-eslint/cjs').
error Parsing error: 'import' and 'export' may appear only with 'sourceType: "module"'
cause Default config expects sourceType: "module" for .js files; project uses CommonJS.
fix
Use the CJS config (require('eslint-config-eslint/cjs')) for CommonJS files.
breaking v14 requires ESLint ^10.0.0 as a peer dependency; ESLint v9 is not compatible.
fix Upgrade ESLint to ^10.0.0. If staying on ESLint v9, use eslint-config-eslint@13.x.
gotcha Default export is ESM-only; using require() on the main entry will throw.
fix Use import for ESM projects, or require('eslint-config-eslint/cjs') for CommonJS.
deprecated ESLint's flat config (eslint.config.js) is now the only supported format; legacy .eslintrc is not used.
fix Migrate to eslint.config.js using flat config. See ESLint migration guide.
gotcha The base config (eslint-config-eslint/base) does not include formatting rules; you must opt-in.
fix Add eslintConfigESLintFormatting from 'eslint-config-eslint/formatting' if formatting rules are needed.
breaking v14 drops support for Node.js versions below ^20.19.0 || ^22.13.0 || >=24.
fix Ensure Node.js version meets the engine requirement.
npm install eslint-config-eslint
yarn add eslint-config-eslint
pnpm add eslint-config-eslint

Shows a minimal eslint.config.js using the default ESM config from eslint-config-eslint with defineConfig.

// eslint.config.js
export default [
  {
    files: ["**/*.js"],
    languageOptions: {
      sourceType: "module",
      ecmaVersion: "latest"
    },
    plugins: {},
    rules: {
      semi: "error",
      "no-unused-vars": "error"
    }
  }
];

// Install
// npm install eslint@^10.0.0 eslint-config-eslint@^14.0.0 -D

// Use with ESLint config:
// eslint.config.js
// import { defineConfig } from "eslint/config";
// import eslintConfigESLint from "eslint-config-eslint";
// export default defineConfig([eslintConfigESLint]);