-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add support for specifying package manager #91
Comments
The @eslint/create-config utility provides a good reference implementation for this. Specifically, it uses the installSyncSaveDev function to handle package installations, allowing the user's choice of package manager to be respected. Adopting a similar approach in stylelint would greatly improve the UX for those not using npm. UPD: Another point of friction is the requirement for a I would be happy to contribute a Pull Request to implement this feature. |
@jeddy3 can you transfer this issue to stylelint/create-stylelint? |
Yep, I've found I've posted this in the wrong repo right after opening this. Sorry about that. Working on a PR rn. When the issue is transfered I'm opening it UPD: Ready with the PR. |
@idkgene Thank you for the clearly-written suggestion and for preparing a PR. I've transferred the issue. |
What is the problem you're trying to solve?
Currently, when initializing a new stylelint configuration using
npm init stylelint
, the process implicitly assumes the use of npm as the package manager. This can be inconvenient for projects that utilize other package managers like pnpm or yarn. For instance, as demonstrated in the provided terminal output, when initializing ESLint with@eslint/config
, the tool explicitly asks "Which package manager do you want to use?".1. Example eslint init output:
When stylelint initializes and installs dependencies, it uses npm. If a project is using pnpm, for example, the developer then needs to manually manage the dependencies. This extra step can be streamlined.
2. Example stylelint init output:
What solution would you like to see?
I propose adding an interactive option during the npm init stylelint process that allows users to select their preferred package manager. This could be implemented as a prompt similar to the one used by @eslint/create-config.
The text was updated successfully, but these errors were encountered: