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

🚀 Feature: Bring in eslint-plugin-node-dependencies's valid-semver rule #49

Open
JoshuaKGoldberg opened this issue Sep 20, 2023 · 6 comments · Fixed by #654
Open
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Sep 20, 2023

Splitting out from #43 (comment) & #42: eslint-plugin-node-dependencies has a valid-semver rule. Let's merge it into this package!

https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/valid-semver.html

Blocked on #40, but once that PR is merged this will be good to go.

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: blocked Waiting for something else to be resolved labels Sep 20, 2023
@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! and removed status: blocked Waiting for something else to be resolved labels Jan 20, 2024
@JoshuaKGoldberg
Copy link
Owner Author

Note that this is different from #130 -> #135. valid-version is for the root-level version. This is for individual package versions.

@JoshuaKGoldberg JoshuaKGoldberg changed the title Bring in eslint-plugin-node-dependencies's valid-semver rule 🚀 Featuer: Bring in eslint-plugin-node-dependencies's valid-semver rule Jan 20, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the title 🚀 Featuer: Bring in eslint-plugin-node-dependencies's valid-semver rule 🚀 Feature: Bring in eslint-plugin-node-dependencies's valid-semver rule Jan 20, 2024

This comment was marked as outdated.

@michaelfaith
Copy link
Collaborator

Are you thinking this would just be incorporated into the valid-package-definition rule / PJV to tighten the testing of the version version check that it does, or as its own rule? It feels like it could be its own rule. So the valid-package-definition is more about the shape of the package.json being valid, whereas this would be a more granular check of the version ranges? What do you think?

@JoshuaKGoldberg
Copy link
Owner Author

That's what I'm thinking, yeah. I think valid-package-definition is an extremely wide rule and it would makes sense to split it up into more targeted rules. JoshuaKGoldberg/package-json-validator#80

@michaelfaith
Copy link
Collaborator

I see. So this work would start in PJV making it more modular. That's kind of adjacent to this comment I made in the TS PR, suggesting that the large single named export could be deprecated in favor of exporting the individual functions and constants directly: https://github.com/JoshuaKGoldberg/package-json-validator/pull/110/files#diff-1df698d75ae20791f18d3bf63174980da33961f49732636648f671b1921929bfR509-R510

So you're seeing the logic for this still living in PJV, but that it's just broken up more so that this plugin could use different validations for different rules?

@JoshuaKGoldberg
Copy link
Owner Author

Oh TIL I'm not watching all events on that repo. I'd missed that TS PR! Thanks 😄.

And yes, that's what I'm envisioning. I think there will always be a use case for package-json-validator to run all checks the way it does now. But the underlying individual functions would be used by this package and potentially others, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants