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

Bug: @eslint/config init installs wrong dependencies #87

Closed
1 task
ArtoLaitinen opened this issue Apr 6, 2024 · 1 comment · Fixed by #92 or #90
Closed
1 task

Bug: @eslint/config init installs wrong dependencies #87

ArtoLaitinen opened this issue Apr 6, 2024 · 1 comment · Fixed by #92 or #90
Labels
accepted bug Something isn't working

Comments

@ArtoLaitinen
Copy link

Environment

Node version: 20.11.1
npm version: 10.2.4
Local ESLint version: ^8.57.0
Global ESLint version: 8.57.0
Operating System: Windows 10

What parser are you using?

Default (Espree)

What did you do?

Configuration

I was initializing eslint for my node backend and I used the npm init @eslint/config command to initiate the config dialogue.
I selected the following configurations:

image

Then it told me what dependecies that configuration needed and I installed them:

image

The bug that I found was that it still installed the following dependencies eventhough in the config dialogue I told it that my project was using node so there shouldnt be no need for the react and jsx plugins.

image

What did you expect to happen?

I expected it to only install the needed dependencies and nothing else

What actually happened?

It installed

  • eslint-plugin-jsx-a11y
  • eslint-plugin-react
  • eslint-plugin-react-hooks

eventhough I specified that my code ran on Node and not on Browser

Link to Minimal Reproducible Example

the minimal reproducible example is already in the "what did you do " section

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

@ArtoLaitinen ArtoLaitinen added bug Something isn't working repro:needed labels Apr 6, 2024
@ArtoLaitinen ArtoLaitinen changed the title Bug: @eslint/config inti Bug: @eslint/config init Apr 6, 2024
@ArtoLaitinen ArtoLaitinen changed the title Bug: @eslint/config init Bug: @eslint/config init installs wrong dependencies Apr 6, 2024
@fasttime fasttime transferred this issue from eslint/eslint Apr 6, 2024
@fasttime
Copy link
Member

fasttime commented Apr 6, 2024

Thanks for the report @ArtoLaitinen, I can reproduce this. It seems that create-config is adding unnecessary dependencies to the project.

aladdin-add added a commit that referenced this issue Apr 10, 2024
eslint-congif-airbnb is only used for react.
fixes #87
aladdin-add added a commit that referenced this issue Apr 10, 2024
eslint-congif-airbnb is only used for react.
fixes #87
aladdin-add added a commit that referenced this issue Apr 10, 2024
eslint-congif-airbnb is only used for react.
fixes #87
aladdin-add added a commit that referenced this issue Apr 10, 2024
eslint-congif-airbnb is only used for react.
fixes #87
aladdin-add added a commit that referenced this issue Apr 10, 2024
eslint-congif-airbnb is only used for react.
fixes #87
mdjermanovic pushed a commit that referenced this issue Apr 10, 2024
eslint-congif-airbnb is only used for react.
fixes #87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted bug Something isn't working
Projects
Archived in project
2 participants