eslint
eslint copied to clipboard
Bug: --inspect-config should always download the latest @eslint/config-inspector?
Environment
Node version: v20.13.1 npm version: v10.5.2 Local ESLint version: v9.2.0 (Currently used) Global ESLint version: Not found Operating System: darwin 23.5.0
What parser are you using?
Default (Espree)
What did you do?
Configuration
import eslint from "@eslint/js";
export default [
eslint.configs.recommended,
];
I wanted to see my configuration, so I ran:
npx eslint --inspect-config
which I suppose runs npx @eslint/config-inspector
.
What did you expect to happen?
I expected to see my configuration open in the browser.
What actually happened?
I got an error that my config wasn't found and that ESLint itself wasn't found. Running npx @eslint/config-inspector
didn't help either.
However, what did fix the problem was running:
npx @eslint/config-inspector@latest
I first thought that this was because it installed a newer version of @eslint/config-inspector
, but both versions of the inspector were v0.4.8.
So I'm not sure why this fixes my problem.
Link to Minimal Reproducible Example
https://github.com/silvenon/repro/tree/eslint-v9-inspect-config
Participation
- [ ] I am willing to submit a pull request for this issue.
Additional comments
No response
For future reference, should "ESLint Config Inspector" issues be posted to /eslint/eslint
or /eslint/config-inspector
?
Previously: CLI launches older release
For future reference, should "ESLint Config Inspector" issues be post to
/eslint/eslint
or/eslint/config-inspector
?Previously: CLI launches older release
Usually to the /eslint/config-inspector
repo, but this particular issue seems to be a problem with how eslint --inspect-config
runs @eslint/config-inspector
.
I got an error that my config wasn't found and that ESLint itself wasn't found. Running
npx @eslint/config-inspector
didn't help either.However, what did fix the problem was running:
npx @eslint/config-inspector@latest
I first thought that this was because it installed a newer version of
@eslint/config-inspector
, but both versions of the inspector were v0.4.8.So I'm not sure why this fixes my problem.
Strange. We've now changed --inspect-config
to run npx @eslint/config-inspector@latest
, but we'll leave this issue open until we release this change (https://github.com/eslint/eslint/issues/18479) to see if it fixes the problem.
Strange. We've now changed
--inspect-config
to runnpx @eslint/config-inspector@latest
Yeah, I was also really surprised… anyway, thanks for picking this up so quickly!