mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-14 16:50:37 +00:00
* fix: resolve all biome lint warnings across the codebase - Replace all noExplicitAny with proper types (unknown, Record<string, unknown>) - Fix useBlockStatements in picker.ts (braceless if) - Fix useNumberNamespace in picker.ts (parseInt → Number.parseInt) - Codebase now passes biome lint with 0 errors and 0 warnings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: ban `as` type assertions, add runtime schema validation with valibot Replace all ~170 unsafe `as` type assertions across the entire codebase (production + tests) with runtime-validated alternatives: - Add GritQL biome plugin (`no-type-assertion.grit`) that bans all `as` casts except `as const` - Add valibot for schema-validated JSON parsing (`parseJsonWith`) - Add shared utilities: `parse.ts` (schema parsing), `type-guards.ts` - Replace `as` casts in all 5 cloud modules (aws, daytona, hetzner, digitalocean, fly) with valibot schemas + type guards - Replace `as` casts in shared modules (manifest, update-check, oauth, commands, history, ui) - Replace `as any` in all 26 test files with proper `new Response()` mocks and typed variables - Add 13 tests for parseJsonWith/parseJsonRaw - Add "Embrace Bold Changes" culture rule to CLAUDE.md - Bump version 0.6.19 → 0.7.0 1859 tests pass, 0 lint errors across 95 files, bundle +6KB from valibot. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: move GritQL plugin into cli/lint/ directory Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: lab <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
104 lines
2.6 KiB
JSON
104 lines
2.6 KiB
JSON
{
|
|
"$schema": "https://biomejs.dev/schemas/2.4.3/schema.json",
|
|
"vcs": {
|
|
"enabled": true,
|
|
"clientKind": "git",
|
|
"useIgnoreFile": true,
|
|
"defaultBranch": "main"
|
|
},
|
|
"files": {
|
|
"ignoreUnknown": false,
|
|
"includes": ["src/**/*.ts"]
|
|
},
|
|
"formatter": {
|
|
"enabled": true,
|
|
"indentStyle": "space",
|
|
"indentWidth": 2,
|
|
"lineWidth": 120
|
|
},
|
|
"linter": {
|
|
"enabled": true,
|
|
"rules": {
|
|
"recommended": true,
|
|
"complexity": {
|
|
"useLiteralKeys": "off",
|
|
"noForEach": "off",
|
|
"noUselessSwitchCase": "off"
|
|
},
|
|
"style": {
|
|
"noNonNullAssertion": "off",
|
|
"useNodejsImportProtocol": "error",
|
|
"useTemplate": "off",
|
|
"useBlockStatements": "error",
|
|
"noParameterAssign": "off",
|
|
"useConst": "error",
|
|
"useDefaultParameterLast": "error",
|
|
"useSelfClosingElements": "error",
|
|
"useSingleVarDeclarator": "error",
|
|
"noUnusedTemplateLiteral": "error",
|
|
"useNumberNamespace": "error",
|
|
"noInferrableTypes": "error",
|
|
"noUselessElse": "error",
|
|
"useImportType": "error"
|
|
},
|
|
"correctness": {
|
|
"noUnusedImports": "error",
|
|
"noUnusedVariables": "error",
|
|
"noUnusedFunctionParameters": "warn",
|
|
"noInnerDeclarations": "error"
|
|
},
|
|
"suspicious": {
|
|
"noExplicitAny": "warn",
|
|
"noAssignInExpressions": "error",
|
|
"noFallthroughSwitchClause": "error",
|
|
"noDoubleEquals": "error",
|
|
"noExtraNonNullAssertion": "error",
|
|
"noTemplateCurlyInString": "off",
|
|
"noImplicitAnyLet": "error",
|
|
"noGlobalIsNan": "error",
|
|
"noGlobalIsFinite": "error",
|
|
"noControlCharactersInRegex": "off"
|
|
},
|
|
"performance": {
|
|
"recommended": true,
|
|
"noAccumulatingSpread": "error"
|
|
},
|
|
"security": {
|
|
"recommended": true
|
|
}
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"includes": ["src/__tests__/**"],
|
|
"linter": {
|
|
"rules": {
|
|
"suspicious": {
|
|
"noExplicitAny": "off",
|
|
"noImplicitAnyLet": "off",
|
|
"noAssignInExpressions": "off"
|
|
},
|
|
"correctness": {
|
|
"noUnusedVariables": "off",
|
|
"noUnusedFunctionParameters": "off"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"javascript": {
|
|
"formatter": {
|
|
"expand": "always",
|
|
"arrowParentheses": "always",
|
|
"quoteStyle": "double",
|
|
"trailingCommas": "all",
|
|
"semicolons": "always",
|
|
"bracketSpacing": true,
|
|
"bracketSameLine": false
|
|
}
|
|
},
|
|
"plugins": ["./lint/no-type-assertion.grit"],
|
|
"assist": {
|
|
"enabled": false
|
|
}
|
|
}
|