sort-keys documentation is unclear about what "natural ordering" means #9043
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
The
sort-keys
rule has anatural
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 after2
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 thenatural
option changes the behavior.The text was updated successfully, but these errors were encountered: