chore: upgrade biome to 2.4.16 (config migration + 2.x reformat)#48
Merged
Conversation
…rmat to 2.x style
- Bump @biomejs/biome from 1.9.4 to 2.4.16 (pnpm-workspace.yaml catalog +
hub package.json)
- Migrate biome.json: vcs.useIgnoreFile=true so target/ and node_modules/
are excluded via .gitignore; remove files.ignore (removed in 2.x), use
files.includes with negation patterns
- Reformat 114 files to biome 2.x style (import sort order, template
literals, trailing commas, quote normalization)
- Restore two reformat-broken field declarations removed by biome --write:
ChannelLogger.config (LogConfig) and ThemeManager.configDir (string)
- Fix residual lint errors (25 → 0):
- noVoidTypeReturn (×19, meta.ts PROD): remove bare `return` from all
void-typed facade methods that delegate to sub-DALs
- noImplicitAnyLet (×2, channels.ts + session-manager.ts PROD): add
explicit Channel[] and LaunchProfile|undefined type annotations
- noNonNullAssertion (×14, *.spec.ts + spawn-test.ts): restructure with
local variable + expect().toBeDefined() + if-guard for test files;
justified biome-ignore for Buffer bounds-checked loop in spawn-test.ts
- noExplicitAny (×2, useBellSound.spec.ts + spawn-test.ts): replace
`as any` with `keyof typeof globalThis` and UiSpawnOkMessage cast
- noTemplateCurlyInString (×24, var-expansion.spec.ts): file-level
biome-ignore-all — intentional literal ${} test data
- suppressions/unused (×3, agent-deployer.spec.ts + validation.ts):
remove stale biome-ignore comments whose rules no longer fire in 2.x
There was a problem hiding this comment.
Pull request overview
This PR upgrades the repo’s Biome tooling from 1.9.x to 2.4.16, migrates biome.json to the 2.x schema (including VCS ignore support), and applies the Biome 2.x formatting/lint autofixes across the TypeScript codebase.
Changes:
- Bump
@biomejs/biometo^2.4.16(catalog + lockfile) and migratebiome.jsonto the Biome 2.x schema withvcs.useIgnoreFileand an explicit!**/targetexclusion. - Reformat TypeScript sources/tests to the Biome 2.x formatter output and address newly surfaced lint findings (e.g., void-return facades, non-null assertions in tests, implicit-any cleanup).
- Minor refactors/cleanups in hub/shared/web code to satisfy updated lint/style constraints (imports ordering, type-only imports, small correctness nits in tests).
Reviewed changes
Copilot reviewed 117 out of 119 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/sea-hub-e2e.spec.ts | Reformat E2E SEA hub test to Biome 2.x style. |
| scripts/package-sea-hub.ts | Reformat SEA packaging script; no functional change intended. |
| scripts/build-sea-hub.spec.ts | Reformat SEA hub build tests to Biome 2.x style. |
| scripts/build-sea-binary.ts | Reformat SEA binary builder; minor readability changes. |
| scripts/build-sea-binary.spec.ts | Reformat SEA binary builder tests. |
| pnpm-workspace.yaml | Catalog bump for @biomejs/biome to 2.4.16. |
| pnpm-lock.yaml | Lockfile update for Biome 2.4.16 and platform CLIs. |
| packages/shared/src/var-expansion.spec.ts | Add Biome ignore for intentional ${} test literals. |
| packages/shared/src/validation.ts | Minor edit in validation module (comment-only change). |
| packages/shared/src/validation.spec.ts | Import reordering to match formatter output. |
| packages/shared/src/sea-addon-loader.ts | Env var access refactor (process.env.X style). |
| packages/shared/src/index.ts | Barrel export reordering to match formatter output. |
| packages/shared/src/framing.spec.ts | Import order reformat. |
| packages/shared/package.json | JSON formatting changes. |
| packages/hub/src/ws/ws-handler.ts | Import/type ordering reformat. |
| packages/hub/src/ws/ws-handler.spec.ts | Import grouping reformat. |
| packages/hub/src/ws/handlers/spawn.ts | Reformat + string literal normalization. |
| packages/hub/src/ws/handlers/index.ts | Export ordering and type export position. |
| packages/hub/src/theme-manager.ts | Import ordering reformat. |
| packages/hub/src/theme-manager.spec.ts | Import ordering and cleanup. |
| packages/hub/src/storage/meta.ts | Remove redundant return from void façade methods. |
| packages/hub/src/storage/meta.spec.ts | Import ordering reformat. |
| packages/hub/src/storage/meta-launch-profiles.spec.ts | Rename unused locals and reformat. |
| packages/hub/src/storage/index.ts | Export ordering / type export ordering. |
| packages/hub/src/storage/hosts-dal.spec.ts | Import ordering reformat. |
| packages/hub/src/storage/db.ts | Import ordering reformat. |
| packages/hub/src/storage/db.spec.ts | Import ordering reformat. |
| packages/hub/src/spawn-test.ts | Add targeted Biome ignores + tighten types in logging. |
| packages/hub/src/shell-discovery.ts | Import ordering reformat. |
| packages/hub/src/session/write-lock.spec.ts | Remove unused test imports (beforeEach/vi) and reformat. |
| packages/hub/src/session/termora-agent.ts | Import ordering reformat. |
| packages/hub/src/session/termora-agent.spec.ts | Rename unused locals and reformat. |
| packages/hub/src/session/state-broadcaster.ts | Type import cleanup + optional chaining refactor. |
| packages/hub/src/session/ssh-exec.spec.ts | Add Biome ignore for safe non-null assertion in test. |
| packages/hub/src/session/ssh-connection-manager.ts | Import/type ordering reformat. |
| packages/hub/src/session/ssh-connection-manager.spec.ts | Replace non-null assertions with explicit guards. |
| packages/hub/src/session/ssh-agent.ts | Reformat + minor string/template cleanup. |
| packages/hub/src/session/ssh-agent.spec.ts | Consolidate imports and reformat. |
| packages/hub/src/session/snapshot-scheduler.spec.ts | Import ordering reformat. |
| packages/hub/src/session/session-manager.spec.ts | Replace non-null assertions with guards; import consolidation. |
| packages/hub/src/session/session-manager-onboarding.spec.ts | Import ordering reformat. |
| packages/hub/src/session/daemon-integration.spec.ts | Import ordering reformat. |
| packages/hub/src/session/channel-lifecycle-manager.ts | Import ordering cleanup + optional chaining refactor. |
| packages/hub/src/session/channel-lifecycle-manager.spec.ts | Replace non-null assertions with optional chaining in tests. |
| packages/hub/src/session/agent-launcher.spec.ts | Remove unused args and reformat. |
| packages/hub/src/session/agent-deployer.ts | Reformat + string literal normalization. |
| packages/hub/src/session/agent-connection-manager.ts | Reformat + small safety tweaks (optional chaining). |
| packages/hub/src/server.ts | Reformat + small string literal normalization in auth/CORS logic. |
| packages/hub/src/server.spec.ts | Reformat + string literal normalization. |
| packages/hub/src/sea-static-server.ts | Minor string formatting + export ordering. |
| packages/hub/src/sea-agent-resolver.ts | Export ordering normalization. |
| packages/hub/src/open-browser.spec.ts | Remove unused test imports and reformat. |
| packages/hub/src/logging/index.ts | Type export ordering reformat. |
| packages/hub/src/logging/hub-logger.ts | Minor string construction refactor. |
| packages/hub/src/logging/hub-logger.spec.ts | Reduce non-null assertions; reformat. |
| packages/hub/src/logging/channel-logger.ts | Minor object property access + string construction refactor. |
| packages/hub/src/logging/channel-logger.spec.ts | Reduce non-null assertions; reformat. |
| packages/hub/src/config.ts | Import ordering; rename unused helper; small regex tweak. |
| packages/hub/src/config.spec.ts | Import consolidation/reformat. |
| packages/hub/src/build-version.ts | String literal normalization/reformat. |
| packages/hub/src/auth.ts | Remove unused imports. |
| packages/hub/src/auth.spec.ts | Import ordering reformat. |
| packages/hub/src/appearance-manager.ts | Import ordering reformat. |
| packages/hub/src/api/wallpapers.spec.ts | Import ordering reformat. |
| packages/hub/src/api/tokens.spec.ts | Remove unused import; reformat. |
| packages/hub/src/api/themes.ts | Import ordering reformat. |
| packages/hub/src/api/themes.spec.ts | Import ordering reformat. |
| packages/hub/src/api/ssh-keys.ts | Small string template refactor + request body access style change. |
| packages/hub/src/api/ssh-keys.spec.ts | Optional chaining refactor in auth check. |
| packages/hub/src/api/routes.spec.ts | Import ordering reformat. |
| packages/hub/src/api/pair.spec.ts | Import ordering reformat. |
| packages/hub/src/api/pagination.spec.ts | Import ordering reformat. |
| packages/hub/src/api/logs.ts | Switch to dot-property access for parsed JSONL records. |
| packages/hub/src/api/logs.spec.ts | String construction reformat; readability tweaks. |
| packages/hub/src/api/launch-profiles.ts | Import ordering reformat. |
| packages/hub/src/api/launch-profiles.spec.ts | Import ordering reformat. |
| packages/hub/src/api/host-ssh-import.ts | Import ordering reformat. |
| packages/hub/src/api/host-profiles.ts | Import ordering reformat. |
| packages/hub/src/api/host-groups.spec.ts | Import ordering reformat. |
| packages/hub/src/api/host-crud.ts | Reformat route registration; no functional change intended. |
| packages/hub/src/api/fonts.ts | Import ordering reformat. |
| packages/hub/src/api/fonts.spec.ts | Import ordering reformat. |
| packages/hub/src/api/config.ts | Import ordering reformat. |
| packages/hub/src/api/config.spec.ts | Import ordering reformat. |
| packages/hub/src/api/channels.ts | Add explicit Channel[] typing and adjust imports. |
| packages/hub/package.json | JSON formatting changes. |
| packages/clients/web/src/stores/theme.spec.ts | Import ordering reformat. |
| packages/clients/web/src/stores/session.ts | Import ordering reformat. |
| packages/clients/web/src/stores/profiles.ts | Formatting (blank line) per formatter output. |
| packages/clients/web/src/stores/config.ts | Remove unused type import. |
| packages/clients/web/src/stores/channels.ts | Minor local rename to satisfy lint; state sync logic unchanged. |
| packages/clients/web/src/services/ws-client.ts | Import ordering reformat. |
| packages/clients/web/src/env.d.ts | Formatting (blank line) per formatter output. |
| packages/clients/web/src/composables/useWindowTitle.ts | Import ordering reformat. |
| packages/clients/web/src/composables/useWallpaper.ts | Import ordering reformat. |
| packages/clients/web/src/composables/useVisualProfile.ts | Import ordering reformat. |
| packages/clients/web/src/composables/useTabTitle.ts | Import ordering reformat. |
| packages/clients/web/src/composables/useSearchShortcuts.ts | Remove unused import and reformat. |
| packages/clients/web/src/composables/useSearchShortcuts.spec.ts | Import ordering reformat. |
| packages/clients/web/src/composables/useScrollBehavior.ts | Remove unused import and reformat. |
| packages/clients/web/src/composables/useResolvedProfile.ts | Import ordering reformat. |
| packages/clients/web/src/composables/useRename.ts | Import ordering reformat. |
| packages/clients/web/src/composables/usePaneTree.ts | Import ordering reformat. |
| packages/clients/web/src/composables/useMultiPaneSearch.ts | Import ordering reformat. |
| packages/clients/web/src/composables/useLayout.ts | Re-export ordering + import ordering reformat. |
| packages/clients/web/src/composables/useLayout.spec.ts | Rename unused helper; import ordering reformat. |
| packages/clients/web/src/composables/useFileDrop.spec.ts | Replace non-null assertions with optional chaining in tests. |
| packages/clients/web/src/composables/useCommandPalette.ts | Rename unused store local to satisfy lint. |
| packages/clients/web/src/composables/useBellSound.ts | Type formatting normalization. |
| packages/clients/web/src/composables/useBellSound.spec.ts | Add Biome ignore for test spy typing edge case. |
| packages/clients/web/src/composables/useActivityTracker.ts | Remove unused import and reformat. |
| packages/clients/web/src/composables/useActivityTracker.spec.ts | Remove unused import and reformat. |
| packages/clients/desktop/tauri-config.spec.ts | Reformat + string literal normalization. |
| biome.json | Migrate to Biome 2.x schema; enable VCS ignore; update include/exclude set. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+471
to
472
| const _syncIds = new Set(syncChannels.map((s) => s.channelId)); | ||
| let changed = false; |
Comment on lines
+1
to
+6
| import { resolve } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import { describe, expect, it } from "vitest"; | ||
|
|
||
| import { existsSync } from 'node:fs'; | ||
| import { join, resolve } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { describe, expect, it } from 'vitest'; | ||
|
|
||
| const __dirname = fileURLToPath(new URL('.', import.meta.url)); | ||
| const ROOT = resolve(__dirname, '..'); | ||
| const __dirname = fileURLToPath(new URL(".", import.meta.url)); | ||
| const _ROOT = resolve(__dirname, ".."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the pinned Biome from 1.9.x to 2.4.16.
@biomejs/biome→^2.4.16;biome.jsonmigrated to the 2.x schema.vcs.useIgnoreFileand added!**/targetso Biome no longer scans the Rusttarget/build output (the scan set drops from ~3200 files to ~283 — the project sources).let, non-null assertions and explicit-any casts in tests).Note: Biome 2.x
check --writesilently dropped twoprivate readonlyfield declarations (channel-logger.ts,theme-manager.ts) during the reformat; both were restored and verified bytsc.biome checkis clean (0 errors), hub + web typecheck pass, full test suite green.