ESLint Config Schema Reference

All ESLint flat-config and .eslintrc fields with types and plugin extension.

Reference for the ESLint configuration schema covering flat config (eslint.config.js) and legacy .eslintrc fields — rules, plugins, languageOptions, files, ignores and overrides — with types and examples. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is flat config versus .eslintrc?

Flat config (eslint.config.js) is the default since ESLint 9: an array of config objects evaluated in order. Legacy .eslintrc uses cascading files with extends and env. Most fields map across but plugins and parsers are declared differently.

Look up ESLint configuration fields fast

ESLint can be configured two ways: the modern flat config in eslint.config.js and the legacy .eslintrc files. This reference lists the fields each format accepts, their types and how plugins and rules are wired in, so you can build or fix a config without digging through docs. It runs entirely in your browser.

Flat config structure

Flat config (default since ESLint 9) exports an array of config objects, each with optional files, ignores, languageOptions, plugins, rules and settings. ESLint merges the objects that match a given file in array order, with later objects winning. Rule severity is off, warn or error (or 0, 1, 2), optionally followed by rule options:

import js from "@eslint/js";
import globals from "globals";

export default [
  js.configs.recommended,
  {
    files: ["**/*.ts"],
    languageOptions: { globals: globals.node, ecmaVersion: 2023 },
    rules: { "no-unused-vars": ["error", { argsIgnorePattern: "^_" }] },
  },
];

Flat config fields at a glance

FieldTypePurpose
filesstring[]Glob patterns — which files this config object applies to
ignoresstring[]Glob patterns to exclude; standalone = global ignore list
languageOptionsobjectParser, ecmaVersion, sourceType, globals
languageOptions.globalsobjectGlobal variables (from globals package)
languageOptions.parserobjectCustom parser (e.g. @typescript-eslint/parser)
languageOptions.parserOptionsobjectParser-specific options (e.g. project for type-aware linting)
pluginsobjectNamespace → plugin module mapping
rulesobjectRule name → severity or [severity, options]
settingsobjectFree-form data shared with all rules in this config
processorstring or objectPost-processor for non-JS files (e.g. extracting JS from Markdown)

Legacy .eslintrc mapping

If you are migrating from .eslintrc, here is how the key fields map:

.eslintrc fieldFlat config equivalent
extendsImport the config and spread into the array
envlanguageOptions.globals via the globals package
parserlanguageOptions.parser
parserOptionslanguageOptions.parserOptions
plugins (string array)plugins (namespace-to-module object)
rulesrules (unchanged)
settingssettings (unchanged)
.eslintignoreConfig object with only ignores
overridesAdditional array entries with files

Tips and examples

  • A flat-config object containing only ignores is a global ignore list and replaces the old .eslintignore file.
  • Reference a plugin rule by its namespace: register plugins: { import: x }, then enable "import/order": "warn".
  • Use languageOptions.parser to swap in typescript-eslint’s parser for type-aware linting, paired with parserOptions.project.
  • The settings object is free-form shared state passed to every rule — this is how plugins like eslint-plugin-import learn your module resolver configuration.
  • Flat config is evaluated from first to last; when two entries match the same file, the later one’s rules override the earlier one’s for any conflicting rule.