refactor(lint): enable map spread rule

This commit is contained in:
Peter Steinberger
2026-04-18 19:53:02 +01:00
parent 0c245c35c5
commit 4fa961d4f1
73 changed files with 352 additions and 344 deletions

View File

@@ -141,7 +141,7 @@ function normalizeProviderModels(
return model;
}
mutated = true;
return { ...model, id: nextId };
return Object.assign({}, model, { id: nextId });
});
return mutated ? { ...provider, models: nextModels } : provider;

View File

@@ -120,10 +120,9 @@ async function runGeminiSearch(params: {
for (let index = 0; index < rawCitations.length; index += 10) {
const batch = rawCitations.slice(index, index + 10);
const resolved = await Promise.all(
batch.map(async (citation) => ({
...citation,
url: await resolveCitationRedirectUrl(citation.url),
})),
batch.map(async (citation) =>
Object.assign({}, citation, { url: await resolveCitationRedirectUrl(citation.url) }),
),
);
citations.push(...resolved);
}