refactor(sort): remove unused lexicalSort function

This commit is contained in:
icarus 2025-10-23 22:24:16 +08:00
parent 262b0aeeb6
commit 5b4f15d355

View File

@ -1,22 +1,3 @@
// https://github.com/Gudahtt/prettier-plugin-sort-json/blob/main/src/index.ts
/**
* Lexical sort function for strings, meant to be used as the sort
* function for `Array.prototype.sort`.
*
* @param a - First element to compare.
* @param b - Second element to compare.
* @returns A number indicating which element should come first.
*/
function lexicalSort(a: string, b: string): number {
if (a > b) {
return 1
}
if (a < b) {
return -1
}
return 0
}
/**
* Natural sort function for strings, meant to be used as the sort
* function for `Array.prototype.sort`.