mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-08-17 04:23:36 +00:00
fix: remove unused biome-ignore suppression comments in shared type-guards (#1892)
The `packages/shared/src/type-guards.ts` file had 4 `biome-ignore lint/plugin:` comments that were ineffective because the shared package does not configure the GritQL plugin in its biome config. Biome reported these as `suppressions/unused` warnings. Removing them brings the shared package to zero lint warnings. Fixes #1889 Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5b9ceef060
commit
fda44b10f7
2 changed files with 1 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn-shared",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -1,26 +1,22 @@
|
|||
// shared/type-guards.ts — Runtime type guards (replaces unsafe `as` casts on non-API values)
|
||||
|
||||
export function isString(val: unknown): val is string {
|
||||
// biome-ignore lint/plugin: this IS the type guard definition
|
||||
return typeof val === "string";
|
||||
}
|
||||
|
||||
export function isNumber(val: unknown): val is number {
|
||||
// biome-ignore lint/plugin: this IS the type guard definition
|
||||
return typeof val === "number";
|
||||
}
|
||||
|
||||
export function hasStatus(err: unknown): err is {
|
||||
status: number;
|
||||
} {
|
||||
// biome-ignore lint/plugin: composite guard uses typeof internally
|
||||
return err !== null && typeof err === "object" && "status" in err && typeof err.status === "number";
|
||||
}
|
||||
|
||||
export function hasMessage(err: unknown): err is {
|
||||
message: string;
|
||||
} {
|
||||
// biome-ignore lint/plugin: composite guard uses typeof internally
|
||||
return err !== null && typeof err === "object" && "message" in err && typeof err.message === "string";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue