Flat config files can export either an array or an object. Right now, config inspector throws an error when attempting to load a config file with an object config like this:
Failed to load `eslint.config.js`.
Note that `@eslint/config-inspector` only works with the flat config format:
https://eslint.org/docs/latest/use/configure/configuration-files-new
TypeError: rawConfigs is not iterable
at readConfig (file:///C:/Users/nzaka/AppData/Local/npm-cache/_npx/37ca41379bd26461/node_modules/@eslint/config-inspector/dist/cli.mjs:99:22)
at async Object.getData (file:///C:/Users/nzaka/AppData/Local/npm-cache/_npx/37ca41379bd26461/node_modules/@eslint/config-inspector/dist/cli.mjs:200:16)
at async Object.handler (file:///C:/Users/nzaka/AppData/Local/npm-cache/_npx/37ca41379bd26461/node_modules/@eslint/config-inspector/dist/cli.mjs:232:46)
at async Object.handler (file:///C:/Users/nzaka/AppData/Local/npm-cache/_npx/37ca41379bd26461/node_modules/h3/dist/index.mjs:1962:19)
at async Server.toNodeHandle (file:///C:/Users/nzaka/AppData/Local/npm-cache/_npx/37ca41379bd26461/node_modules/h3/dist/index.mjs:2249:7)
It probably makes sense to just treat a config file that exports an object as an array with one item?
Flat config files can export either an array or an object. Right now, config inspector throws an error when attempting to load a config file with an object config like this:
Error:
It probably makes sense to just treat a config file that exports an object as an array with one item?