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

Move stylelint-config-recommended to peerDeps #68

Open
Ahmed-Alsalim opened this issue Dec 22, 2023 · 8 comments
Open

Move stylelint-config-recommended to peerDeps #68

Ahmed-Alsalim opened this issue Dec 22, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@Ahmed-Alsalim
Copy link

stylelint 16 dropped support for node 14 and 16 so it could be helpful to make a version that uses stylelint 15 and another version for stylelint >=16.
currently it's possible to use overrides for npm and resolutions for yarn as a workaround to keep versions that supports node 14 & 16 but a separate version of this repo would be more helpful.

@ota-meshi
Copy link
Owner

I don't see why that would be helpful. Since I have confirmed that stylelint v16 can be used without changing the source code of this package, I think it is a good not to make any breaking changes.

@Ahmed-Alsalim
Copy link
Author

existing old projects who have to use node 14 or 16 can't use stylelint 16 as it requires node >= 18.
to be specific I meant this one "stylelint-config-recommended": ">=6.0.0" which automatically installs latest version (v14) that uses stylelint 16.
without setting overrides or resolutions for that dependency, installing your package in node 16 throws an error

@ota-meshi
Copy link
Owner

If you are using older Node.js, I think you should just use Stylelint v15 or earlier. Why install Stylelint v16? This incompatibility is also indicated in the documentation.
https://stylelint.io/migration-guide/to-16#removed-support-for-nodejs-less-than-18120

@Ahmed-Alsalim
Copy link
Author

What I'm trying to say is currently your package installs stylelint-config-recommended 14.0.0 as a dependency even if I'm using node 16 which throws an error. you can replicate the error by simply using node 16 and running yarn add stylelint-config-recommended-vue -D
image

@ota-meshi
Copy link
Owner

Hmm. Perhaps stylelint-config-recommended-vue should list stylelint-config-recommended in peerDeps? I definitely don't want to make breaking changes at least every time a new version of stylelint is released, as stylelint-config-recommended-vue would require a major version release every month.

@Ahmed-Alsalim
Copy link
Author

I guess that could work. Don't forget to update readme to tell users to install the proper version of stylelint-config-recommended as peerDeps are not auto-installed by default. BTW about breaking changes and major versions, having 2 major versions will be enough for now. one for node <18 (stylelint-config-recommended: "^13.0.0") and one for node >= 18 (stylelint-config-recommended: ">=14.0.0"). next major version will only be needed when they remove support for node 18 which I don't think is happening any time soon

@ota-meshi ota-meshi changed the title make a separate version for stylelint >=16.0.0 Move stylelint-config-recommended to peerDeps Dec 28, 2023
@ota-meshi ota-meshi added enhancement New feature or request and removed needs more info labels Dec 28, 2023
@gmcinalli
Copy link

Hi @ota-meshi, any updates on this?

@traceslord
Copy link

traceslord commented May 14, 2024

package.json

{
  "dependencies": {
    "stylelint-config-recommended-vue": "~1.4.0"
  },
  "resolutions": {
    "stylelint-config-recommended": "^13.0.0"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants