refactor: satisfy no-array-filter-map and no-accumulating-spread

This commit is contained in:
Chris Scott committed 2026-11-13 01:45:13 -05:00
1 parent b96a248cef
commit 19ee1d9173
16 files changed
+68 -68

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ async function chooseFromLocal(
const matchIds = new Set(matches.map((repo) => repo.repoId))
return selectDialog<SwitchChoice>(context, 'Switch to Manager repo', [
...matches.map((repo) => repoOption(repo, MATCH_CATEGORY)),
...repos.filter((repo) => !matchIds.has(repo.repoId)).map((repo) => repoOption(repo, REPO_CATEGORY)),
...repos.flatMap((repo) => (matchIds.has(repo.repoId) ? [] : [repoOption(repo, REPO_CATEGORY)])),
])
}