eslint / config-inspector

A visual tool for inspecting and understanding your ESLint flat configs.
https://www.npmjs.com/package/@eslint/config-inspector
Apache License 2.0
734 stars 19 forks source link

Cannot find Eslint config file #82

Closed carlosriveroib closed 3 months ago

carlosriveroib commented 3 months ago

Hi, when I try to use it I got this message

Captura de pantalla 2024-08-15 a las 10 09 59

I have an .eslintrc.js file at the root the project. Also tried renaming it to .eslint.config.js having the same issue

This is my eslint config

Captura de pantalla 2024-08-15 a las 10 10 41

Thank you

voxpelli commented 3 months ago

That config is not the new flat config style, this inspector only supports inspecting flat configs (eg. eslint.config.js)

See migration docs for how you can migrate: https://eslint.org/docs/latest/use/configure/migration-guide


I think this issue is good to keep open though, as the error message could be improved – both to detect the presence of a legacy config and warn explicitly about that, and else to tell where it looked for the file, so that its easier to debug.

Also: The stack trace is unnecessary for this kind of error.

voxpelli commented 3 months ago

@carlosriveroib The new version should give you a better error message and as such help you figure this out 🙏