-
-
Notifications
You must be signed in to change notification settings - Fork 19
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 installs old version #106
Comments
Duplicate of eslint/eslint#18369 |
Moving this over to the create-config repo as this isn't tied to anything ESLint is doing. |
@aladdin-add can you take a look at this? |
I was able to repro! However, it's expected behavior: the required deps you can use |
Should we maybe detect this and then ask if people want to override and force ESLint 9 to be installed? |
I don't think it's appropriate (at least for most users) - eslint v9 is not supported by the plugin, and not even tested. We can output some information, the advanced users can upgrade to v9 manually if they are willing to try, just like use-at-your-own-risks. |
some known issues: jsx-eslint/eslint-plugin-react#3699 |
What part isn't appropriate? I think telling people that they're using a plugin that isn't supported in v9 and then giving them the option to continue or install v8 makes sense in all cases. Is there something I'm missing? |
It doesn't seem reasonable to install a version that may not work. good to use |
Sorry, I think maybe I'm not explaining myself well. What I think we should do for now is, if they select React, to message them saying, "The React plugin works in ESLint < 9.0.0. Would you like to install ESLint 8.57?" (or something like that) To make it obvious what is happening. If they answer "No", then we just don't add the plugin. Does that make sense? And yes, once the compat utility is published, we can always go back and wrap the plugin and avoid this mess. |
I see, thanks for explaining. SGTM. 👍 |
Compat utility is ready: https://eslint.org/blog/2024/05/eslint-compatibility-utilities/ |
* fix: use eslint v9 when choosing react fixes #106 * fix: use `--force` * chore: add a note * fix: ask installing eslint v8/v9 * chore: add more tests * fix: rm an unused assignment
Environment
Node version: v21.7.3
npm version: 10.5.2
Local ESLint version: v9.1.1
Operating System: MacOS
What parser are you using?
Default (Espree)
What did you do?
$ npm init @eslint/config@latest
(accept defaults)
$ npx eslint --version
What did you expect to happen?
v9.1.1
What actually happened?
v8.57.0
The text was updated successfully, but these errors were encountered: