ESLint is a pluggable static analysis tool for JavaScript and TypeScript that identifies and fixes code quality issues at build time. Flat config (eslint.config.js), introduced in ESLint v8.21.0 and made default in v9.0.0, replaces the legacy .eslintrc format with a simpler, more flexible array-based configuration that uses native JavaScript imports. ESLint v10 (released February 2026) removes legacy config support entirely, requiring Node.js 20+ and eliminating .eslintrc compatibility. The flat config system unifies configuration through programmatic composition, eliminating the complexity of cascading .eslintrc files, extends string resolution, and environment-based globals — making linting faster, more predictable, and easier to debug with tools like the official Config Inspector.
What This Cheat Sheet Covers
This topic spans 15 focused tables and 108 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Flat Config Fundamentals
| Concept | Example | Description |
|---|---|---|
export default [<br> { rules: { "no-unused-vars": "error" } }<br>]; | Default flat config filename in project root; exports an array of config objects applied sequentially. | |
{<br> files: ["src/**/*.js"],<br> rules: { semi: "error" }<br>} | Single configuration unit with files, ignores, rules, languageOptions, plugins, and linterOptions keys. | |
files: ["**/*.ts", "!**/*.test.ts"] | Glob pattern array specifying which files the config applies to; relative to config file location. | |
{ ignores: ["dist/**", "node_modules/**"] } | Global ignore when used alone; local ignore when combined with other keys in the same object. | |
export default [<br> js.configs.recommended,<br> myConfig,<br> { rules: { ... } }<br>]; | Configs merge left to right; later configs override earlier ones for matching files. |