{"id":19508,"library":"eslint-config-eslint","title":"ESLint Config (eslint-config-eslint)","description":"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.","status":"active","version":"14.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/eslint/eslint","tags":["javascript","eslintconfig","eslint-config","eslint","typescript"],"install":[{"cmd":"npm install eslint-config-eslint","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-eslint","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-eslint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency - requires ESLint ^10.0.0 core","package":"eslint","optional":false}],"imports":[{"note":"Default export only works with ESM (type: module). For CommonJS, use require('eslint-config-eslint/cjs').","wrong":"const eslintConfigESLint = require('eslint-config-eslint')","symbol":"default (eslintConfigESLint)","correct":"import eslintConfigESLint from 'eslint-config-eslint'"},{"note":"CommonJS entry point; not available as ESM since it uses require internally.","wrong":"import eslintConfigESLintCJS from 'eslint-config-eslint/cjs'","symbol":"eslintConfigESLintCJS","correct":"const eslintConfigESLintCJS = require('eslint-config-eslint/cjs')"},{"note":"Base config for non-Node.js files; available in ESM and CJS (require).","wrong":"","symbol":"eslintConfigESLintBase","correct":"import eslintConfigESLintBase from 'eslint-config-eslint/base'"},{"note":"Optional formatting config; add separately if formatting rules are desired.","wrong":"","symbol":"eslintConfigESLintFormatting","correct":"import eslintConfigESLintFormatting from 'eslint-config-eslint/formatting'"}],"quickstart":{"code":"// eslint.config.js\nexport default [\n  {\n    files: [\"**/*.js\"],\n    languageOptions: {\n      sourceType: \"module\",\n      ecmaVersion: \"latest\"\n    },\n    plugins: {},\n    rules: {\n      semi: \"error\",\n      \"no-unused-vars\": \"error\"\n    }\n  }\n];\n\n// Install\n// npm install eslint@^10.0.0 eslint-config-eslint@^14.0.0 -D\n\n// Use with ESLint config:\n// eslint.config.js\n// import { defineConfig } from \"eslint/config\";\n// import eslintConfigESLint from \"eslint-config-eslint\";\n// export default defineConfig([eslintConfigESLint]);","lang":"typescript","description":"Shows a minimal eslint.config.js using the default ESM config from eslint-config-eslint with defineConfig."},"warnings":[{"fix":"Upgrade ESLint to ^10.0.0. If staying on ESLint v9, use eslint-config-eslint@13.x.","message":"v14 requires ESLint ^10.0.0 as a peer dependency; ESLint v9 is not compatible.","severity":"breaking","affected_versions":">=14.0.0"},{"fix":"Use import for ESM projects, or require('eslint-config-eslint/cjs') for CommonJS.","message":"Default export is ESM-only; using require() on the main entry will throw.","severity":"gotcha","affected_versions":">=14.0.0"},{"fix":"Migrate to eslint.config.js using flat config. See ESLint migration guide.","message":"ESLint's flat config (eslint.config.js) is now the only supported format; legacy .eslintrc is not used.","severity":"deprecated","affected_versions":">=14.0.0"},{"fix":"Add eslintConfigESLintFormatting from 'eslint-config-eslint/formatting' if formatting rules are needed.","message":"The base config (eslint-config-eslint/base) does not include formatting rules; you must opt-in.","severity":"gotcha","affected_versions":">=14.0.0"},{"fix":"Ensure Node.js version meets the engine requirement.","message":"v14 drops support for Node.js versions below ^20.19.0 || ^22.13.0 || >=24.","severity":"breaking","affected_versions":">=14.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install eslint-config-eslint -D. If using CommonJS, use require('eslint-config-eslint/cjs').","cause":"Package not installed or incorrect import path (CommonJS using default instead of /cjs).","error":"Cannot find module 'eslint-config-eslint'"},{"fix":"Create eslint.config.js and use import/require as shown in documentation.","cause":"Using legacy .eslintrc format with extends; eslint-config-eslint v14 only supports flat config.","error":"Failed to load config \"eslint-config-eslint\" to extend from."},{"fix":"Set \"type\": \"module\" in package.json, or use require('eslint-config-eslint/cjs').","cause":"ESM import used in a CommonJS project without type: module.","error":"Cannot use import statement outside a module"},{"fix":"Use the CJS config (require('eslint-config-eslint/cjs')) for CommonJS files.","cause":"Default config expects sourceType: \"module\" for .js files; project uses CommonJS.","error":"Parsing error: 'import' and 'export' may appear only with 'sourceType: \"module\"'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}