spawn/lint
A 01b23042b8
style: enforce separated type imports via biome (#1870)
* refactor: clean up SPA code — extract helpers, use isString, DRY Slack calls

helpers.ts:
- Extract parseAssistantEvent/parseUserEvent/formatToolHint from parseStreamEvent
- Eliminate redundant second scans for toolName and isError (captured during loop)
- Use isString() from @openrouter/spawn-shared instead of typeof checks
- Split long node:fs import across multiple lines

main.ts:
- Extract postOrUpdate() to DRY the post-vs-update pattern (was 3 copy-paste blocks)
- Add SlackClient type alias (replaces 4x InstanceType<typeof App>["client"])
- Remove unused Mapping import
- Inline REQUIRED_VARS into for loop
- Rename currentMsgTs → msgTs
- Tighten formatting throughout

spa.test.ts:
- Remove unused beforeEach import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add biome config to SPA, fix all lint/format, add PostToolUse hook

- Add biome.json extending lint/biome.json (2-space indent, 120 line width,
  useBlockStatements, expand:always, etc.)
- Fix all 36 useBlockStatements violations (braceless if/continue/return)
- Fix all format issues (line width, expand, trailing commas)
- Add biome lint+format to PostToolUse hook — runs automatically on any
  .ts file edit when a biome.json is found in the file's directory

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: enforce separated type imports via biome useImportType

Add `style: "separatedType"` to the base biome config's useImportType
rule. This enforces `import type { T }` on its own line instead of
mixing `type` into value imports (`import { type T, foo }`).

Auto-fixed 21 violations across CLI (18) and SPA (3).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-24 00:16:03 -08:00
..
biome.json style: enforce separated type imports via biome (#1870) 2026-02-24 00:16:03 -08:00
no-type-assertion.grit feat: SPA — Spawn's Personal Agent (#1825) 2026-02-23 19:52:14 -08:00
no-typeof-string-number.grit feat: SPA — Spawn's Personal Agent (#1825) 2026-02-23 19:52:14 -08:00