fix(lint): replace explicit-any types + unused-expressions ternaries
Five files, all stylistic: - useFlowPilotSession.ts: typed the axios error shape with a narrow inline type instead of \`as any\`. - FlowPilotSessionPage.tsx: same — typed location.state once, then destructured. - ScriptBuilderTab.tsx: handleViewScript was a placeholder no-op; declared the args properly with \`void script; void filename\` so the signature matches ScriptBuilderChatProps without no-unused-vars firing. - TicketsPage.tsx: replaced 8 ternaries-as-statements (\`x ? f() : g()\`) with proper if/else blocks. Same control flow, satisfies no-unused-expressions, and reads better in the URL-param update paths. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -19,8 +19,9 @@ export default function FlowPilotSessionPage() {
|
||||
const navigate = useNavigate()
|
||||
const location = useLocation()
|
||||
const prefill = (location.state as { prefill?: string } | null)?.prefill || ''
|
||||
const psaTicketId = (location.state as any)?.psaTicketId as string | undefined
|
||||
const psaTicket = (location.state as any)?.psaTicket as PSATicketInfo | undefined
|
||||
const locationState = location.state as { psaTicketId?: string; psaTicket?: PSATicketInfo } | null
|
||||
const psaTicketId = locationState?.psaTicketId
|
||||
const psaTicket = locationState?.psaTicket
|
||||
const isPickup = searchParams.get('pickup') === 'true'
|
||||
const fp = useFlowPilotSession()
|
||||
const branching = useBranching()
|
||||
|
||||
Reference in New Issue
Block a user