keithamus / sort-package-json

Sort an Object or package.json based on the well-known package.json keys
MIT License
790 stars 83 forks source link

Document the order of top-level keys? #306

Closed JoshuaKGoldberg closed 7 months ago

JoshuaKGoldberg commented 7 months ago

Is the actual order of keys enforced by this package mentioned in any docs? Sorry if I missed it!

https://github.com/keithamus/sort-package-json/blob/93a1cbcfbc3b7cacd8a93784c61d3b8db8fa23be/index.js#L186 looks like the place in code. But it'd be nice to have a mention somewhere of what this order ends up being for end-user runs.

keithamus commented 7 months ago

Hey @JoshuaKGoldberg! I don't think it's mentioned anywhere. I welcome PRs from you or anyone reading this, to add the sort order to the README.

Even better: if you can add a test that verifies the sort order in the README matches the code, or even better than that, an action to generate the sort order in the README. As it's a lot of keys it should be wrapped in a <details> element.

github-actions[bot] commented 6 months ago

:tada: This issue has been resolved in version 2.8.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: