ESLint 9.0 Makes Flat Config the New Default

by Ada
Last updated on May 24, 2024

ESLint 9.0 Makes Flat Config the New Default

ESLint 9.0 has been released with flat config as the new default configuration format, simplifying project setup and improving the overall developer experience.

Flat Config Benefits

The new flat config format replaces the complex .eslintrc files with a simpler, JavaScript-first approach:

  • Single configuration file
  • No more extends confusion
  • Better TypeScript support
  • Easier to share configurations

Simplified Plugin System

Plugins are now imported directly as JavaScript modules, making configuration more explicit and eliminating the string-based plugin system that often caused confusion.

Improved Performance

ESLint 9.0 includes significant performance improvements:

  • 25% faster linting for large codebases
  • Reduced memory consumption
  • Better cache utilization

Breaking Changes

The legacy .eslintrc format is deprecated but still supported with a warning. Projects are encouraged to migrate using the official migration tool.

Enhanced Error Messages

Error messages are now more helpful, providing context about which rule failed and suggestions for fixing issues.

Language Support

Better support for modern JavaScript features and TypeScript syntax, with improved parsing of decorators, explicit resource management, and other recent language additions.