From 2192f1790dc0027d2075cb5f93e4e2b80073738a Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Thu, 21 May 2026 17:01:02 -0700 Subject: [PATCH] Add oxlint config and fix unicorn/no-array-sort violation Promote unicorn/no-array-sort to error in oxlint.json and replace [...teams].sort() with teams.toSorted() in discord.ts. Co-Authored-By: Claude Sonnet 4.6 --- app/services/discord.ts | 2 +- oxlint.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 oxlint.json diff --git a/app/services/discord.ts b/app/services/discord.ts index 8c8eda5..d9d6091 100644 --- a/app/services/discord.ts +++ b/app/services/discord.ts @@ -208,7 +208,7 @@ export async function sendDraftOrderNotification({ ? `Draft Order Manually Set — ${leagueName}` : `Draft Order Randomized — ${leagueName}`; - const sorted = [...teams].sort((a, b) => a.position - b.position); + const sorted = teams.toSorted((a, b) => a.position - b.position); let description = sorted .map((t) => { const teamLabel = escapeMarkdown(t.name); diff --git a/oxlint.json b/oxlint.json new file mode 100644 index 0000000..91c983e --- /dev/null +++ b/oxlint.json @@ -0,0 +1,5 @@ +{ + "rules": { + "unicorn/no-array-sort": "error" + } +}