-
Notifications
You must be signed in to change notification settings - Fork 29
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
Enable require-array-sort-compare
#61
Labels
Comments
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
Resolves #61 BREAKING CHANGE: A compare function is now required when calling `sort` on non-string arrays. This change applies to TypeScript only.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
Resolves #61 BREAKING CHANGE: A compare function is now required when calling `sort` on non-string arrays. This change applies to TypeScript only.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
Resolves #61 BREAKING CHANGE: A compare function is now required when calling `sort` on non-string arrays. This change applies to TypeScript only.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
Resolves #61 BREAKING CHANGE: A compare function is now required when calling `sort` on non-string arrays. This change applies to TypeScript only.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
Resolves #61 BREAKING CHANGE: A compare function is now required when calling `sort` on non-string arrays. This change applies to TypeScript only.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
Resolves #61 BREAKING CHANGE: A compare function is now required when calling `sort` on non-string arrays. This change applies to TypeScript only.
🎉 This PR is included in version 5.0.0 🎉 The release is available on: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By default,
sort
first coerces items to strings, which will be unexpected behaviour for some/many engineers. See this thread for details: https://twitter.com/meoyawn/status/1659905876529143809This rule requires that when arrays of items other than strings is being sorted, a compare function is supplied.
https://typescript-eslint.io/rules/require-array-sort-compare/
The text was updated successfully, but these errors were encountered: