Skip to content
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

fix: use @eslint/compat to fix eslint v9 + react plugin #113

Merged
merged 6 commits into from May 13, 2024
Merged

Conversation

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label May 6, 2024
@aladdin-add aladdin-add marked this pull request as ready for review May 7, 2024 03:18
@aladdin-add aladdin-add force-pushed the issue106 branch 2 times, most recently from 53b12bf to 9fd8cee Compare May 10, 2024 02:49
@aladdin-add aladdin-add changed the title fix: mention eslint-plugin-react plugin currently does not support ES… fix: use eslint v9 when choosing react May 10, 2024
@aladdin-add aladdin-add marked this pull request as draft May 10, 2024 02:53
@aladdin-add aladdin-add force-pushed the issue106 branch 2 times, most recently from dfa8026 to 45949b2 Compare May 10, 2024 03:04
@aladdin-add aladdin-add marked this pull request as ready for review May 10, 2024 05:57
@aladdin-add aladdin-add requested a review from a team May 10, 2024 05:57
@@ -68,7 +68,7 @@ export class ConfigGenerator {
message: "Which framework does your project use?",
initial: 0,
choices: [
{ message: "React", name: "react" },
{ message: "React (⚠️eslint v9 has not been officially supported.)", name: "react" },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a note, as it will output an warning when using npm install --force:

The config that you've selected requires the following dependencies:

eslint@^9.2.0, globals, @eslint/js, eslint-plugin-react, @eslint/compat
✔ Would you like to install them now? · No / Yes
✔ Which package manager do you want to use? · npm
☕️Installing...
npm WARN using --force Recommended protections disabled.
npm WARN idealTree Removing dependencies.eslint in favor of devDependencies.eslint
npm WARN idealTree Removing dependencies.globals in favor of devDependencies.globals
npm WARN idealTree Removing dependencies.@eslint/js in favor of devDependencies.@eslint/js
npm WARN idealTree Removing dependencies.eslint-plugin-react in favor of devDependencies.eslint-plugin-react
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: example@1.0.0
npm WARN Found: eslint@8.57.0
npm WARN node_modules/eslint
npm WARN   peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0
npm WARN   node_modules/@eslint-community/eslint-utils
npm WARN     @eslint-community/eslint-utils@"^4.2.0" from eslint@8.57.0
npm WARN   2 more (eslint-plugin-react, the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8" from eslint-plugin-react@7.34.1
npm WARN node_modules/eslint-plugin-react
npm WARN   dev eslint-plugin-react@"*" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-plugin-react@7.34.1
npm WARN Found: eslint@9.2.0
npm WARN node_modules/eslint
npm WARN   dev eslint@"^9.2.0" from the root project
npm WARN   1 more (@eslint-community/eslint-utils)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8" from eslint-plugin-react@7.34.1
npm WARN node_modules/eslint-plugin-react
npm WARN   dev eslint-plugin-react@"*" from the root project
npm WARN 
npm WARN Conflicting peer dependency: eslint@8.57.0
npm WARN node_modules/eslint
npm WARN   peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8" from eslint-plugin-react@7.34.1
npm WARN   node_modules/eslint-plugin-react
npm WARN     dev eslint-plugin-react@"*" from the root project

added 5 packages, removed 3 packages, and changed 19 packages in 30s

36 packages are looking for funding
  run `npm fund` for details

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will confuse people. What if we just kept this as "React", and then, if it is selected, output another message:

The React plugin doesn't officially support ESLint v9 yet. What would you like to do?

  • Install ESLint v9.x with compatibility utilities
  • Install ESLint v8.x

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 sounds good, will make a change later.

@aladdin-add aladdin-add requested a review from nzakas May 13, 2024 04:16
@aladdin-add aladdin-add changed the title fix: use eslint v9 when choosing react fix: use @eslint/compat to fix react plugin May 13, 2024
@aladdin-add aladdin-add changed the title fix: use @eslint/compat to fix react plugin fix: use @eslint/compat to fix eslint v9 + react plugin May 13, 2024
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@nzakas nzakas merged commit 61a385e into main May 13, 2024
11 checks passed
@nzakas nzakas deleted the issue106 branch May 13, 2024 14:26
@github-actions github-actions bot mentioned this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Init wizard installs old version
2 participants