From 27974dfbfe20c7615c0e2adb35f188baa0aad5d5 Mon Sep 17 00:00:00 2001 From: hyperz111 Date: Wed, 14 Jan 2026 00:25:37 +0700 Subject: [PATCH] fix: fix lint issues --- lib/formatter.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/formatter.js b/lib/formatter.js index dd90dbb..3a6fb72 100644 --- a/lib/formatter.js +++ b/lib/formatter.js @@ -6,7 +6,9 @@ function sortBy(cb) { return (v1, v2) => { v1 = cb(v1); v2 = cb(v2); - return v1 < v2 ? -1 : v1 > v2 ? 1 : 0; + if (v1 < v2) return -1; + if (v1 > v2) return 1; + return 0; }; } @@ -25,8 +27,8 @@ function createSortFunction(positionless, sortByPosition) { if (sortByPosition) { return (v1, v2) => ( sortFunction(v1, v2) || - sortBy((m) => m.line || "")(v1, v2) || - sortBy((m) => m.column || "")(v1, v2)); + sortBy((m) => m.line || '')(v1, v2) || + sortBy((m) => m.column || '')(v1, v2)); } return sortFunction;