Closed haocheng6 closed 11 months ago
Nice catch! Do you mind if I merge this but create a new release a little later?
@azat-io No, not at all. I don't think this bug will affect too many users if they just use the config on the documentation site. Also, alphabetical sorting and natural sorting produce the same result in most real-world use cases. So it is ok to release the fix later.
Also, thanks for taking the time to review the PR.
Description
Currently, the default
type
specified in the schema of every rule isSortType.natural
. This will cause inconsistent behavior. For example,"perfectionist/sort-array-includes": "error"
and"perfectionist/sort-array-includes": ["error", {}]
don't work in the same way. The first one uses alphabetical sorting while the second uses natural sorting.This PR fixes the default
type
for all rules.Additional context
N/A
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).