Skip to content

Commit

Permalink
feat(eslint): enable @typescript-eslint/require-array-sort-compare
Browse files Browse the repository at this point in the history
Resolves #61

BREAKING CHANGE: A compare function is now required when calling `sort` on non-string arrays.
This change applies to TypeScript only.
  • Loading branch information
mrmckeb committed Aug 29, 2023
1 parent 6b4214f commit c55c6fc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions eslint/rules/typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ module.exports = {
* 🔧 Fixable - https://typescript-eslint.io/rules/prefer-regexp-exec/
*/
'@typescript-eslint/prefer-regexp-exec': 'warn',
/**
* Require Array#sort calls to provide a compare function.
*
* 🚫 Not fixable - https://typescript-eslint.io/rules/require-array-sort-compare/
*/
'@typescript-eslint/require-array-sort-compare': [
'error',
{ ignoreStringArrays: true },
],
/**
* Require exhaustive checks when using union types in switch statements.
*
Expand Down

0 comments on commit c55c6fc

Please sign in to comment.