Skip to content

Commit d69d3da

Browse files
committed
chore(lint): remove unused catch bindings, dead private types, and unused loggers
1 parent 2cbc59e commit d69d3da

113 files changed

Lines changed: 53 additions & 1766 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/desktop/src/main/browser-credentials/os-auth.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ async function promptForSecret(reason: string, action: string): Promise<boolean>
147147
? await showShellDialog(parent, options)
148148
: await showShellDialog(options)
149149
return response === 1
150-
} catch (error) {
150+
} catch {
151151
// Fail closed: if the confirmation cannot be shown, nothing is revealed.
152152
logger.warn('Could not present the credential confirmation')
153153
return false

‎apps/sim/app/api/files/authorization.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ export class FileAccessDeniedError extends Error {
3131
}
3232
}
3333

34-
interface AuthorizationResult {
35-
granted: boolean
36-
reason: string
37-
workspaceId?: string
38-
}
39-
4034
type WorkspacePermission = 'read' | 'write' | 'admin'
4135

4236
/**

‎apps/sim/app/api/files/utils.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ export interface ApiSuccessResponse {
1414
[key: string]: any
1515
}
1616

17-
interface ApiErrorResponse {
18-
error: string
19-
message?: string
20-
}
21-
2217
export interface FileResponse {
2318
buffer: Buffer
2419
contentType: string

‎apps/sim/app/api/providers/base/models/route.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const GET = withRouteHandler(async () => {
77
try {
88
const allModels = Object.keys(getBaseModelProviders())
99
return NextResponse.json(providerModelsResponseSchema.parse({ models: allModels }))
10-
} catch (error) {
10+
} catch {
1111
return NextResponse.json({ models: [], error: 'Failed to fetch models' }, { status: 500 })
1212
}
1313
})

‎apps/sim/app/api/wand/route.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ export const POST = withRouteHandler(async (req: NextRequest) => {
464464
let parsed: any
465465
try {
466466
parsed = JSON.parse(data)
467-
} catch (parseError) {
467+
} catch {
468468
continue
469469
}
470470

‎apps/sim/app/workspace/[workspaceId]/components/custom-tool-editor/custom-tool-code-field.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
PopoverScrollArea,
1212
PopoverSection,
1313
} from '@sim/emcn'
14-
import { createLogger } from '@sim/logger'
1514
import {
1615
CODE_PLACEHOLDER,
1716
type SchemaParameter,
@@ -27,8 +26,6 @@ import {
2726
} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
2827
import { CodeEditor } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/code-editor/code-editor'
2928

30-
const logger = createLogger('CustomToolCodeField')
31-
3229
interface CustomToolCodeFieldProps {
3330
value: string
3431
onChange: (value: string) => void

‎apps/sim/app/workspace/[workspaceId]/home/hooks/stream/stream-helpers.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { createLogger } from '@sim/logger'
21
import { isRecordLike } from '@sim/utils/object'
32
import { isUnsettledToolState } from '@/lib/mothership/chat/persisted-message'
43
import {
@@ -40,8 +39,6 @@ import { ToolCallStatus } from '@/app/workspace/[workspaceId]/home/types'
4039
import { useWorkflowRegistry } from '@/stores/workflows/registry/store'
4140
import { useWorkflowStore } from '@/stores/workflows/workflow/store'
4241

43-
const logger = createLogger('StreamHelpers')
44-
4542
export const FILE_SUBAGENT_ID = 'file'
4643

4744
export const DEPLOY_TOOL_NAMES: Set<string> = new Set([

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ export const Dropdown = memo(function Dropdown({
397397
}
398398

399399
return []
400-
} catch (error) {
400+
} catch {
401401
return []
402402
}
403403
}

‎apps/sim/background/webhook-execution.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ async function processTriggerFileOutputs(
238238
normalizeWebhookAttachments(value),
239239
context
240240
)
241-
} catch (error) {
241+
} catch {
242242
processed[key] = []
243243
}
244244
} else if (outputDef?.type === 'file' && value) {

‎apps/sim/blocks/blocks/onedrive.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { createLogger } from '@sim/logger'
21
import { MicrosoftOneDriveIcon } from '@/components/icons'
32
import { getScopesForService } from '@/lib/oauth/utils'
43
import type { BlockConfig, BlockMeta } from '@/blocks/types'
@@ -7,8 +6,6 @@ import { normalizeFileInput } from '@/blocks/utils'
76
import type { OneDriveResponse } from '@/tools/onedrive/types'
87
import { normalizeExcelValuesForToolParams } from '@/tools/onedrive/utils'
98

10-
const logger = createLogger('OneDriveBlock')
11-
129
const UPLOAD_FILE_FIELD = ['file', 'fileReference'] as const
1310
const UPLOAD_FOLDER_FIELD = ['uploadFolderSelector', 'uploadManualFolderId'] as const
1411
const CREATE_FOLDER_PARENT_FIELD = [

0 commit comments

Comments
 (0)