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

package manager (npm, yarn, etc.) is not asked in style (How would you like to use ESLint) option #84

Open
HiteshTheGreatest opened this issue Feb 24, 2024 · 5 comments
Labels
accepted bug Something isn't working

Comments

@HiteshTheGreatest
Copy link

Two questions (that is install the deps and what package manager) are skipped when choose to style options.

@Rec0iL99
Copy link
Member

Hello @hitesh-can-code, could you please provide more details about what you mean by 'style options'?

@HiteshTheGreatest
Copy link
Author

image
eslint need to ask what package manager first than checking peersdeps

@Rec0iL99
Copy link
Member

Rec0iL99 commented Feb 26, 2024

I couldn't reproduce this on my local machine

> bun create @eslint/config                                                                                                                                                                                            
✔ How would you like to use ESLint? · style
✔ What type of modules does your project use? · esm
✔ Which framework does your project use? · none
✔ Does your project use TypeScript? · No / Yes
✔ Where does your code run? · node
✔ How would you like to define a style for your project? · guide
✔ Which style guide do you want to follow? · standard-with-typescript
✔ What format do you want your config file to be in? · JSON
Checking peerDependencies of eslint-config-standard-with-typescript@latest
The config that you've selected requires the following dependencies:

eslint-config-standard-with-typescript@latest @typescript-eslint/eslint-plugin@^6.4.0 eslint@^8.0.1 eslint-plugin-import@^2.25.2 eslint-plugin-n@^15.0.0 || ^16.0.0  eslint-plugin-promise@^6.0.0 typescript@*
✔ Would you like to install them now? · No / Yes
? Which package manager do you want to use? … 
❯ npm
  yarn
  pnpm

I'm getting the option to choose which package manager.

> bun --version                                                                                                                                                                                                        
1.0.29

Did I miss something?

@HiteshTheGreatest
Copy link
Author

it is because you have npm installed where i only have bun

@aladdin-add
Copy link
Member

aladdin-add commented Feb 29, 2024

it was not using npm to install any dependencies, it was to check the package's peer dependencies:

const npmProcess = spawn.sync(
"npm",
["show", "--json", packageName, "peerDependencies"],
{ encoding: "utf8" }
);

for no-npm-installed envs, we could find another way to do it.

@aladdin-add aladdin-add added bug Something isn't working accepted labels Feb 29, 2024
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
Status: Ready to Implement
Development

No branches or pull requests

3 participants