fix: lint errors en warnings opgelost voor CI
This commit is contained in:
parent
97a4173cba
commit
ecc7a10679
14 changed files with 38 additions and 26 deletions
12
.claude/settings.local.json
Normal file
12
.claude/settings.local.json
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"allow": [
|
||||||
|
"Bash(npx tsc *)",
|
||||||
|
"Bash(git add *)",
|
||||||
|
"Bash(git commit *)",
|
||||||
|
"Bash(git push *)",
|
||||||
|
"Bash(npx eslint *)",
|
||||||
|
"Bash(npm run *)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,6 @@ import { SessionData, sessionOptions } from '@/lib/session'
|
||||||
import { prisma } from '@/lib/prisma'
|
import { prisma } from '@/lib/prisma'
|
||||||
import { SplitPane } from '@/components/split-pane/split-pane'
|
import { SplitPane } from '@/components/split-pane/split-pane'
|
||||||
import { PlanningLeft } from '@/components/sprint/planning-left'
|
import { PlanningLeft } from '@/components/sprint/planning-left'
|
||||||
import { TaskList } from '@/components/sprint/task-list'
|
|
||||||
import type { Task } from '@/components/sprint/task-list'
|
import type { Task } from '@/components/sprint/task-list'
|
||||||
import { SprintHeader } from '@/components/sprint/sprint-header'
|
import { SprintHeader } from '@/components/sprint/sprint-header'
|
||||||
import type { SprintStory } from '@/components/sprint/sprint-backlog'
|
import type { SprintStory } from '@/components/sprint/sprint-backlog'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { loginAction } from '@/actions/auth'
|
import { loginAction } from '@/actions/auth'
|
||||||
import { Button } from '@/components/ui/button'
|
|
||||||
import { Input } from '@/components/ui/input'
|
|
||||||
import { AuthForm } from '@/components/auth/auth-form'
|
import { AuthForm } from '@/components/auth/auth-form'
|
||||||
|
|
||||||
export default function LoginPage() {
|
export default function LoginPage() {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import {
|
||||||
import { CSS } from '@dnd-kit/utilities'
|
import { CSS } from '@dnd-kit/utilities'
|
||||||
import { toast } from 'sonner'
|
import { toast } from 'sonner'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { DemoTooltip } from '@/components/shared/demo-tooltip'
|
|
||||||
import { Input } from '@/components/ui/input'
|
import { Input } from '@/components/ui/input'
|
||||||
import { Badge } from '@/components/ui/badge'
|
import { Badge } from '@/components/ui/badge'
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,8 @@ function SortableStoryBlock({
|
||||||
// --- Story detail slide-over ---
|
// --- Story detail slide-over ---
|
||||||
function StoryDetailSheet({
|
function StoryDetailSheet({
|
||||||
story,
|
story,
|
||||||
productId,
|
productId: _productId,
|
||||||
pbiId,
|
pbiId: _pbiId,
|
||||||
onClose,
|
onClose,
|
||||||
isDemo,
|
isDemo,
|
||||||
}: {
|
}: {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export function RoleManager({ currentRoles, isDemo }: RoleManagerProps) {
|
||||||
function toggle(role: string) {
|
function toggle(role: string) {
|
||||||
setSelected(prev => {
|
setSelected(prev => {
|
||||||
const next = new Set(prev)
|
const next = new Set(prev)
|
||||||
next.has(role) ? next.delete(role) : next.add(role)
|
if (next.has(role)) { next.delete(role) } else { next.add(role) }
|
||||||
return next
|
return next
|
||||||
})
|
})
|
||||||
setSaved(false)
|
setSaved(false)
|
||||||
|
|
|
||||||
|
|
@ -19,19 +19,18 @@ export function SplitPane({
|
||||||
minSize = 200,
|
minSize = 200,
|
||||||
}: SplitPaneProps) {
|
}: SplitPaneProps) {
|
||||||
const containerRef = useRef<HTMLDivElement>(null)
|
const containerRef = useRef<HTMLDivElement>(null)
|
||||||
const [split, setSplit] = useState<number>(defaultSplit)
|
const [split, setSplit] = useState<number>(() => {
|
||||||
const [isDragging, setIsDragging] = useState(false)
|
if (typeof window === 'undefined') return defaultSplit
|
||||||
const [isMobile, setIsMobile] = useState(false)
|
|
||||||
const [activeTab, setActiveTab] = useState<'left' | 'right'>('left')
|
|
||||||
|
|
||||||
// Load stored split on mount
|
|
||||||
useEffect(() => {
|
|
||||||
const stored = localStorage.getItem(`split-pane:${storageKey}`)
|
const stored = localStorage.getItem(`split-pane:${storageKey}`)
|
||||||
if (stored) {
|
if (stored) {
|
||||||
const val = parseFloat(stored)
|
const val = parseFloat(stored)
|
||||||
if (!isNaN(val) && val > 0 && val < 100) setSplit(val)
|
if (!isNaN(val) && val > 0 && val < 100) return val
|
||||||
}
|
}
|
||||||
}, [storageKey])
|
return defaultSplit
|
||||||
|
})
|
||||||
|
const [isDragging, setIsDragging] = useState(false)
|
||||||
|
const [isMobile, setIsMobile] = useState(false)
|
||||||
|
const [activeTab, setActiveTab] = useState<'left' | 'right'>('left')
|
||||||
|
|
||||||
// Detect mobile
|
// Detect mobile
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import { useState, useTransition, useEffect } from 'react'
|
import { useState, useTransition, useEffect } from 'react'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import {
|
import {
|
||||||
DndContext, DragEndEvent, DragOverEvent, DragStartEvent, DragOverlay,
|
DndContext, DragEndEvent,
|
||||||
KeyboardSensor, PointerSensor, useSensor, useSensors, closestCenter,
|
KeyboardSensor, PointerSensor, useSensor, useSensors, closestCenter,
|
||||||
} from '@dnd-kit/core'
|
} from '@dnd-kit/core'
|
||||||
import {
|
import {
|
||||||
|
|
@ -101,7 +101,7 @@ interface SprintBacklogLeftProps {
|
||||||
selectedStoryId: string | null
|
selectedStoryId: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SprintBacklogLeft({ sprintId, stories, isDemo, onSelectStory, selectedStoryId }: SprintBacklogLeftProps) {
|
export function SprintBacklogLeft({ sprintId, stories, isDemo, onSelectStory }: SprintBacklogLeftProps) {
|
||||||
const { sprintStoryOrder, initSprint, reorderSprintStories, rollbackSprint, removeStoryFromSprint } = useSprintStore()
|
const { sprintStoryOrder, initSprint, reorderSprintStories, rollbackSprint, removeStoryFromSprint } = useSprintStore()
|
||||||
const [, startTransition] = useTransition()
|
const [, startTransition] = useTransition()
|
||||||
|
|
||||||
|
|
@ -186,7 +186,7 @@ export function SprintBacklogRight({ sprintId, pbisWithStories, sprintStoryIds,
|
||||||
function toggle(pbiId: string) {
|
function toggle(pbiId: string) {
|
||||||
setCollapsed(prev => {
|
setCollapsed(prev => {
|
||||||
const next = new Set(prev)
|
const next = new Set(prev)
|
||||||
next.has(pbiId) ? next.delete(pbiId) : next.add(pbiId)
|
if (next.has(pbiId)) { next.delete(pbiId) } else { next.add(pbiId) }
|
||||||
return next
|
return next
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ function SaveGoalButton() {
|
||||||
return <Button type="submit" size="sm" disabled={pending}>{pending ? 'Opslaan…' : 'Opslaan'}</Button>
|
return <Button type="submit" size="sm" disabled={pending}>{pending ? 'Opslaan…' : 'Opslaan'}</Button>
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SprintHeader({ productId, productName, sprint, isDemo, sprintStories }: SprintHeaderProps) {
|
export function SprintHeader({ productId: _productId, productName, sprint, isDemo, sprintStories }: SprintHeaderProps) {
|
||||||
const [editingGoal, setEditingGoal] = useState(false)
|
const [editingGoal, setEditingGoal] = useState(false)
|
||||||
const [completeOpen, setCompleteOpen] = useState(false)
|
const [completeOpen, setCompleteOpen] = useState(false)
|
||||||
const [decisions, setDecisions] = useState<Record<string, 'DONE' | 'OPEN'>>({})
|
const [decisions, setDecisions] = useState<Record<string, 'DONE' | 'OPEN'>>({})
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import { useState, useActionState } from 'react'
|
||||||
import { useFormStatus } from 'react-dom'
|
import { useFormStatus } from 'react-dom'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { Input } from '@/components/ui/input'
|
|
||||||
import { Textarea } from '@/components/ui/textarea'
|
import { Textarea } from '@/components/ui/textarea'
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import { useState, useTransition, useEffect, useActionState } from 'react'
|
import { useState, useTransition, useEffect, useActionState } from 'react'
|
||||||
import { useFormStatus } from 'react-dom'
|
import { useFormStatus } from 'react-dom'
|
||||||
import {
|
import {
|
||||||
DndContext, DragEndEvent, DragOverlay, DragStartEvent,
|
DndContext, DragEndEvent, DragOverlay,
|
||||||
KeyboardSensor, PointerSensor, useSensor, useSensors, closestCenter,
|
KeyboardSensor, PointerSensor, useSensor, useSensors, closestCenter,
|
||||||
} from '@dnd-kit/core'
|
} from '@dnd-kit/core'
|
||||||
import {
|
import {
|
||||||
|
|
@ -144,7 +144,7 @@ function CreateSubmitButton() {
|
||||||
return <Button type="submit" size="sm" className="h-7" disabled={pending}>{pending ? '…' : 'Toevoegen'}</Button>
|
return <Button type="submit" size="sm" className="h-7" disabled={pending}>{pending ? '…' : 'Toevoegen'}</Button>
|
||||||
}
|
}
|
||||||
|
|
||||||
export function TaskList({ storyId, sprintId, productId, tasks, isDemo }: TaskListProps) {
|
export function TaskList({ storyId, sprintId, productId: _productId, tasks, isDemo }: TaskListProps) {
|
||||||
const { taskOrder, initTasks, reorderTasks, rollbackTasks } = useSprintStore()
|
const { taskOrder, initTasks, reorderTasks, rollbackTasks } = useSprintStore()
|
||||||
const [creating, setCreating] = useState(false)
|
const [creating, setCreating] = useState(false)
|
||||||
const [activeDragId, setActiveDragId] = useState<string | null>(null)
|
const [activeDragId, setActiveDragId] = useState<string | null>(null)
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ import { toast } from 'sonner'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { DemoTooltip } from '@/components/shared/demo-tooltip'
|
import { DemoTooltip } from '@/components/shared/demo-tooltip'
|
||||||
import { Input } from '@/components/ui/input'
|
import { Input } from '@/components/ui/input'
|
||||||
import { Textarea } from '@/components/ui/textarea'
|
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
|
|
||||||
import {
|
import {
|
||||||
createTodoAction,
|
createTodoAction,
|
||||||
toggleTodoAction,
|
toggleTodoAction,
|
||||||
|
|
@ -15,7 +13,6 @@ import {
|
||||||
promoteTodoToPbiAction,
|
promoteTodoToPbiAction,
|
||||||
promoteTodoToStoryAction,
|
promoteTodoToStoryAction,
|
||||||
} from '@/actions/todos'
|
} from '@/actions/todos'
|
||||||
import { cn } from '@/lib/utils'
|
|
||||||
|
|
||||||
interface Todo {
|
interface Todo {
|
||||||
id: string
|
id: string
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,15 @@ import nextTs from "eslint-config-next/typescript";
|
||||||
const eslintConfig = defineConfig([
|
const eslintConfig = defineConfig([
|
||||||
...nextVitals,
|
...nextVitals,
|
||||||
...nextTs,
|
...nextTs,
|
||||||
|
{
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", {
|
||||||
|
argsIgnorePattern: "^_",
|
||||||
|
varsIgnorePattern: "^_",
|
||||||
|
caughtErrorsIgnorePattern: "^_",
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
},
|
||||||
// Override default ignores of eslint-config-next.
|
// Override default ignores of eslint-config-next.
|
||||||
globalIgnores([
|
globalIgnores([
|
||||||
// Default ignores of eslint-config-next:
|
// Default ignores of eslint-config-next:
|
||||||
|
|
|
||||||
0
prisma/neon.md
Normal file
0
prisma/neon.md
Normal file
Loading…
Add table
Add a link
Reference in a new issue