ESLint v9 Flat Config: Replace .eslintrc Without Breaking Your Lint
ESLint v9 ignores .eslintrc when eslint.config.js exists. Here's how to write flat config, verify per-file rules, and avoid silent rule loss.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
ESLint v9 ignores .eslintrc when eslint.config.js exists. Here's how to write flat config, verify per-file rules, and avoid silent rule loss.
ESLint 9 flat config replaces .eslintrc cascade with an explicit eslint.config.js array. Learn the migration pattern for TypeScript, explicit imports, and the performance and memory trade-offs to plan for.
Flat config replaces .eslintrc with an array of JavaScript objects. Learn the merge semantics, plugin registration, and migration pitfalls that cause silent lint failures.
ESLint's flat config replaces the .eslintrc cascade with one explicit JavaScript file. Here's what changes, a worked example, and how to decide when migrating is worth it.
Learn how to replace .eslintrc with eslint.config.js, use JavaScript for conditional rules, and verify your flat config with eslint --print-config.
Configuration Strategy for Monorepo Plugin Loading In ESLint v9.0.0+, the transition to Flat Config (eslint.config.js) replaces the legacy hierarchical .eslintrc system. While Flat Config offers explicit control via the files and ignores arrays, monorepos often face challenges when different packages require varying versions of the same plugin. There is a tr
Goal Determine a clear migration path for projects still using legacy .eslintrc files when upgrading to ESLint 9, given the documented shift to the flat‑config system and the ongoing ambiguity about when legacy support will be removed. Constraints & Uncertainty The flat‑config model replaces the directory‑based cascade of legacy .eslintrc files with an o
Determine whether ESLint can guarantee a safe rollback of configuration changes when switching between flat‑config mode and the legacy .eslintrc format without altering the resolved rule set, ignores, or language options for a given file. Flat‑config does not cascade like .eslintrc, the discovered config file is used for that run, and file/ignore paths are i
Goal: Revert to legacy configuration after a Flat Config failure When upgrading to the Flat Config system in ESLint 8+, a mis‑configured eslint.config.js can cause linting to fail or produce incorrect results. The project may still rely on a working legacy .eslintrc hierarchy, but the presence of the new file overrides it. The goal is to recover the previous