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

sort-keys documentation is unclear about what "natural ordering" means #9043

Closed
not-an-aardvark opened this issue Jul 30, 2017 · 1 comment
Closed
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation good first issue Good for people who haven't worked on ESLint before

Comments

@not-an-aardvark
Copy link
Member

The sort-keys rule has a natural option, which indicates that keys should be ordered "naturally". This is implemented using the natural-compare-lite library, and the goal is apparently to handle numeric keys as a human would expect (e.g. 10 should come after 2 in the sort order, even though it comes first alphabetically).

The documentation of sort-keys doesn't describe what "natural order" means, which is confusing. We should update the documentation to at least give a general description of how the natural option changes the behavior.

@not-an-aardvark not-an-aardvark added accepted There is consensus among the team that this change meets the criteria for inclusion good first issue Good for people who haven't worked on ESLint before documentation Relates to ESLint's documentation labels Jul 30, 2017
@karansharma27
Copy link
Contributor

Sent a pull request for the same.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation good first issue Good for people who haven't worked on ESLint before
Projects
None yet
Development

No branches or pull requests

2 participants