fix: address code review feedback - add explicit TypeScript return types

- Add explicit JSX.Element return types to all Kanban components
- Add explicit void return type to handleDragStart
- Add explicit Promise<void> return type to handleDragEnd (async)
- Import React for JSX namespace access
- Complies with typescript.md: explicit return types REQUIRED

Components updated:
- KanbanBoard.tsx
- KanbanColumn.tsx
- TaskCard.tsx

Per code review checklist (code-review.md section 4a):
✓ NO any types
✓ Explicit return types on all exported functions
✓ Explicit parameter types
✓ Interfaces for props
✓ Proper event handler types
This commit is contained in:
Jason Woltje
2026-01-29 20:50:52 -06:00
parent 148aa004e3
commit bcb2913549
3 changed files with 8 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
"use client";
import React from "react";
import type { Task } from "@mosaic/shared";
import { TaskPriority } from "@mosaic/shared";
import { useSortable } from "@dnd-kit/sortable";
@@ -47,7 +48,7 @@ function getInitials(name: string): string {
* - Assignee avatar (if assigned)
* - Due date (if set)
*/
export function TaskCard({ task }: TaskCardProps) {
export function TaskCard({ task }: TaskCardProps): JSX.Element {
const {
attributes,
listeners,