fix: restore lint/build gates

main
Peter Steinberger 2026-02-02 01:25:34 -08:00
parent 9ef24fd400
commit 34dd7324d9
6 changed files with 28 additions and 7 deletions

View File

@ -16,6 +16,7 @@
"oxc/no-map-spread": "off",
"typescript/no-explicit-any": "error",
"typescript/no-extraneous-class": "off",
"typescript/no-redundant-type-constituents": "off",
"typescript/no-unsafe-type-assertion": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/require-post-message-target-origin": "off"

View File

@ -105,9 +105,9 @@
"ios:gen": "cd apps/ios && xcodegen generate",
"ios:open": "cd apps/ios && xcodegen generate && open OpenClaw.xcodeproj",
"ios:run": "bash -lc 'cd apps/ios && xcodegen generate && xcodebuild -project OpenClaw.xcodeproj -scheme OpenClaw -destination \"${IOS_DEST:-platform=iOS Simulator,name=iPhone 17}\" -configuration Debug build && xcrun simctl boot \"${IOS_SIM:-iPhone 17}\" || true && xcrun simctl launch booted ai.openclaw.ios'",
"lint": "oxlint --type-aware",
"lint": "oxlint --type-aware --tsconfig tsconfig.oxlint.json",
"lint:all": "pnpm lint && pnpm lint:swift",
"lint:fix": "oxlint --type-aware --fix && pnpm format:fix",
"lint:fix": "oxlint --type-aware --tsconfig tsconfig.oxlint.json --fix && pnpm format:fix",
"lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)",
"mac:open": "open dist/OpenClaw.app",
"mac:package": "bash scripts/package-mac-app.sh",

View File

@ -20,7 +20,7 @@ const OAUTH_PROVIDER_IDS = new Set<OAuthProvider>(
);
const isOAuthProvider = (provider: string): provider is OAuthProvider =>
OAUTH_PROVIDER_IDS.has(provider);
OAUTH_PROVIDER_IDS.has(provider as OAuthProvider);
const resolveOAuthProvider = (provider: string): OAuthProvider | null =>
isOAuthProvider(provider) ? provider : null;

View File

@ -74,8 +74,11 @@ export function buildEmbeddedSystemPrompt(params: {
});
}
export function createSystemPromptOverride(systemPrompt: string): string {
return systemPrompt.trim();
export function createSystemPromptOverride(
systemPrompt: string,
): (defaultPrompt?: string) => string {
const override = systemPrompt.trim();
return (_defaultPrompt?: string) => override;
}
export function applySystemPromptOverrideToSession(session: AgentSession, override: string) {

View File

@ -40,9 +40,9 @@ export function toToolDefinitions(tools: AnyAgentTool[]): ToolDefinition[] {
execute: async (
toolCallId,
params,
signal,
onUpdate: AgentToolUpdateCallback<unknown> | undefined,
_ctx,
signal,
): Promise<AgentToolResult<unknown>> => {
try {
return await tool.execute(toolCallId, params, signal, onUpdate);
@ -91,9 +91,9 @@ export function toClientToolDefinitions(
execute: async (
toolCallId,
params,
_signal,
_onUpdate: AgentToolUpdateCallback<unknown> | undefined,
_ctx,
_signal,
): Promise<AgentToolResult<unknown>> => {
const outcome = await runBeforeToolCallHook({
toolName: func.name,

17
tsconfig.oxlint.json Normal file
View File

@ -0,0 +1,17 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"lib": ["DOM", "DOM.Iterable", "ES2023", "ScriptHost"],
"noEmit": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "es2023"
},
"include": ["src/**/*.ts", "extensions/**/*.ts"],
"exclude": ["node_modules", "dist"]
}