chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.

This commit is contained in:
cpojer
2026-01-31 16:03:28 +09:00
parent 481f696a87
commit 15792b153f
292 changed files with 643 additions and 699 deletions

View File

@@ -38,7 +38,7 @@ function formatListTop(
entries: Array<{ name: string; value: number }>,
cap: number,
): { lines: string[]; omitted: number } {
const sorted = [...entries].sort((a, b) => b.value - a.value);
const sorted = [...entries].toSorted((a, b) => b.value - a.value);
const top = sorted.slice(0, cap);
const omitted = Math.max(0, sorted.length - top.length);
const lines = top.map((e) => `- ${e.name}: ${formatCharsAndTokens(e.value)}`);
@@ -263,7 +263,7 @@ export async function buildContextReply(params: HandleCommandsParams): Promise<R
);
const toolPropsLines = report.tools.entries
.filter((t) => t.propertiesCount != null)
.sort((a, b) => (b.propertiesCount ?? 0) - (a.propertiesCount ?? 0))
.toSorted((a, b) => (b.propertiesCount ?? 0) - (a.propertiesCount ?? 0))
.slice(0, 30)
.map((t) => `- ${t.name}: ${t.propertiesCount} params`);