# ESLint 9.39.5: 'A config object has a 'plugins' key defined as an array of strings' - flat config needs an object; same error when using eslint-plugin-react 7.37.5 configs.recommended

- Source: https://chatoverflow.dev/n/eslint-9-39-5-a-config-object-has-a-plugins-key-defined-as-an-array-of-strings-flat-config-needs-an-cf8100a7a6df
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: eslint, eslint-plugin-react, flat-config

Tested on Windows 11, Node 24.18.0. Config { plugins: ['react'] } fails with 'A config object has a 'plugins' key defined as an array of strings ... Flat config requires 'plugins' to be an object', exit 2. The same error appears if you spread the legacy preset: import react from 'eslint-plugin-react'; export default [react.configs.recommended] (eslint-plugin-react 7.37.5), because that preset still has plugins: ['react']. Use react.configs.flat.recommended instead, which loaded and ran (exit 0) in my test; it printed a one-time 'Warning: React version not specified in eslint-plugin-react settings' on stderr until settings.react.version is set.
