fix: Resolve web package lint and typecheck errors
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fixes ESLint and TypeScript errors in web package to pass CI checks: - Fixed all Quality Rails violations (14 explicit any types) - Fixed deprecated React event types (FormEvent → SyntheticEvent) - Fixed 26 TypeScript errors (Promise types, test mocks, HTMLElement assertions) - Added vitest DOM matcher type definitions - Fixed unused variables and empty functions - Resolved 43+ additional lint errors Typecheck: ✅ 0 errors Lint: 542 remaining (non-blocking in CI) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,14 +52,14 @@ export default function TeamDetailPage(): ReactElement {
|
||||
const [team] = useState(mockTeamWithMembers);
|
||||
const [isLoading] = useState(false);
|
||||
|
||||
const handleUpdateTeam = (data: { name?: string; description?: string }): void => {
|
||||
const handleUpdateTeam = async (data: { name?: string; description?: string }): Promise<void> => {
|
||||
// TODO: Replace with real API call
|
||||
// await updateTeam(workspaceId, teamId, data);
|
||||
console.log("Updating team:", data);
|
||||
// TODO: Refetch team data
|
||||
};
|
||||
|
||||
const handleDeleteTeam = (): void => {
|
||||
const handleDeleteTeam = async (): Promise<void> => {
|
||||
// TODO: Replace with real API call
|
||||
// await deleteTeam(workspaceId, teamId);
|
||||
console.log("Deleting team");
|
||||
@@ -68,14 +68,14 @@ export default function TeamDetailPage(): ReactElement {
|
||||
router.push(`/settings/workspaces/${workspaceId}/teams`);
|
||||
};
|
||||
|
||||
const handleAddMember = (userId: string, role?: TeamMemberRole): void => {
|
||||
const handleAddMember = async (userId: string, role?: TeamMemberRole): Promise<void> => {
|
||||
// TODO: Replace with real API call
|
||||
// await addTeamMember(workspaceId, teamId, { userId, role });
|
||||
console.log("Adding member:", { userId, role });
|
||||
// TODO: Refetch team data
|
||||
};
|
||||
|
||||
const handleRemoveMember = (userId: string): void => {
|
||||
const handleRemoveMember = async (userId: string): Promise<void> => {
|
||||
// TODO: Replace with real API call
|
||||
// await removeTeamMember(workspaceId, teamId, userId);
|
||||
console.log("Removing member:", userId);
|
||||
|
||||
@@ -107,7 +107,11 @@ export default function TeamsPage(): ReactElement {
|
||||
{showCreateModal && (
|
||||
<Modal
|
||||
isOpen={showCreateModal}
|
||||
onClose={() => !isCreating && setShowCreateModal(false)}
|
||||
onClose={() => {
|
||||
if (!isCreating) {
|
||||
setShowCreateModal(false);
|
||||
}
|
||||
}}
|
||||
title="Create New Team"
|
||||
>
|
||||
<div className="space-y-4">
|
||||
|
||||
Reference in New Issue
Block a user