New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Init wizard not generating flat config #18369
Comments
Same here and it's 100% repeatable. I have read docs through and through to try to figure out who's wrong here but no matter how I read the docs, I only get
Expected result: generated Actual result:
Additional information: selecting predefined code style instead of answering questions leads to even more errors as two of the predefined styles and outright incompatible with 9.x. Still a |
it's mostly a caching issue. can you try |
fyi, this also happens when using |
We've received a few reports generated configs seem to be eslintrc format, so I've updated the documentation to use the latest version. refs: eslint/eslint#18369, eslint/eslint#18361,
It is "fixed" now by breaking the "Where does your code run?" prompt in a way that prevents further execution of the script. I have opened eslint/create-config#104. |
Somewhat better for generating flat config, but still broken. Accepting the defaults install the old version as well, and is pick-up by the CLI: $ npx eslint --version |
We've received a few reports generated configs seem to be eslintrc format, so I've updated the documentation to use the latest version. refs: eslint/eslint#18369, eslint/eslint#18361,
To summarize what's probably going on here:
@krichter722 I believe you can use
@elygeo we need to see what you're seeing and any reproduction steps. "still broken" doesn't give us any useful information. |
It seems there are two issues. The issue of using a cached version of create-config is avoided by "latest": npm init @eslint/config@latest The second issue is that create-config installs two versions of eslint, and the CLI seems to favor the old version as far as I can tell. Noted here #18361 eslint/create-config#106. This is why I filed a separate issue. Perhaps a duplicate as you say, I don't know. Reproduction steps: $ npm init @eslint/config@latest Result: v8.57.0 package.json now contains:
Expected result: v9.1.1 |
Got it, I agree this seems like two different issues. I'll reopen eslint/create-config#106 |
Environment
Node version: v21.7.3
npm version: 10.5.2
Global ESLint version: v9.1.0
Operating System: MacOS
What parser are you using?
Default (Espree)
What did you do?
npm init @eslint/config
What did you expect to happen?
Generate eslint.config.js
What actually happened?
Generate .eslintrc.js
The text was updated successfully, but these errors were encountered: