fix(ui): lint and type-check fixes

Fix broken ESLint config (.eslintrc.cjs missing @rushstack patch, wrong
@typescript-eslint extend syntax). Remove unused imports and variables in
11 components/views. Fix invalid v-else placement in OmgView (move to
Tooltip wrapper instead of inner span).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-05-13 11:25:23 +01:00
parent b8329904e8
commit 56a7ff06d6
12 changed files with 11 additions and 28 deletions

View file

@ -1,12 +1,10 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended',
],
parser: 'vue-eslint-parser',
parserOptions: {

View file

@ -2,7 +2,7 @@
import { computed } from 'vue'
import type { CalendarBlock } from '@/types'
import { hslBgFromHue, hslBorderFromHue } from '@/lib/color'
import { formatTime, formatDuration } from '@/lib/utils'
import { formatDuration } from '@/lib/utils'
const props = defineProps<{
block: CalendarBlock

View file

@ -3,7 +3,7 @@ import Button from '@/components/ui/Button.vue'
type Preset = 'today' | '7d' | '30d' | 'custom'
const props = defineProps<{
defineProps<{
preset: Preset
customFrom: string
customTo: string

View file

@ -2,7 +2,7 @@
import Tooltip from '@/components/ui/Tooltip.vue'
import type { Task } from '@/types'
const props = defineProps<{ task: Task; dragging: boolean }>()
defineProps<{ task: Task; dragging: boolean }>()
const emit = defineEmits<{ edit: [task: Task] }>()
const priorityDot: Record<number, string> = {
@ -12,14 +12,6 @@ const priorityDot: Record<number, string> = {
4: 'bg-slate-300',
5: 'bg-slate-300',
}
const statusLabel: Record<string, string> = {
todo: '',
doing: 'in progress',
testing: 'testing',
done: 'done',
cancelled: 'cancelled',
}
</script>
<template>

View file

@ -3,7 +3,7 @@ import KanbanCard from './KanbanCard.vue'
import EmptyState from '@/components/ui/EmptyState.vue'
import type { Task } from '@/types'
const props = defineProps<{
defineProps<{
status: string
title: string
tasks: Task[]

View file

@ -61,7 +61,7 @@ import { CircleAlert } from 'lucide-vue-next'
import Button from './Button.vue'
import Input from './Input.vue'
const props = withDefaults(defineProps<{
withDefaults(defineProps<{
open: boolean
title: string
description: string

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, computed, reactive, watch, toRef } from 'vue'
import { ref, computed, reactive } from 'vue'
import Input from '@/components/ui/Input.vue'
import Button from '@/components/ui/Button.vue'
import EmptyState from '@/components/ui/EmptyState.vue'

View file

@ -2,8 +2,6 @@
import { ref, onMounted } from 'vue'
import { adminApi } from '@/api/endpoints/admin'
import Card from '@/components/ui/Card.vue'
import CardHeader from '@/components/ui/CardHeader.vue'
import CardTitle from '@/components/ui/CardTitle.vue'
import CardContent from '@/components/ui/CardContent.vue'
import Button from '@/components/ui/Button.vue'
import Dialog from '@/components/ui/Dialog.vue'

View file

@ -7,7 +7,6 @@ import CardContent from '@/components/ui/CardContent.vue'
import Button from '@/components/ui/Button.vue'
import Skeleton from '@/components/ui/Skeleton.vue'
import EmptyState from '@/components/ui/EmptyState.vue'
import { formatDateTime } from '@/lib/utils'
import { Radio, Zap } from 'lucide-vue-next'
const authStore = useAuthStore()

View file

@ -191,9 +191,8 @@ function cancelInline() {
@keydown.enter="commitInline(entry)"
@keydown.escape="cancelInline"
/>
<Tooltip content="Double-click to edit">
<Tooltip v-else content="Double-click to edit">
<span
v-else
class="text-sm font-medium text-foreground cursor-pointer hover:text-primary transition-colors"
@dblclick="startInline(entry, 'name')"
>{{ entry.name }}</span>
@ -212,9 +211,8 @@ function cancelInline() {
@keydown.enter="commitInline(entry)"
@keydown.escape="cancelInline"
/>
<Tooltip content="Double-click to edit">
<Tooltip v-else content="Double-click to edit">
<span
v-else
class="text-sm text-muted-foreground cursor-pointer hover:text-foreground transition-colors"
:class="entry.client ? '' : 'italic opacity-40'"
@dblclick="startInline(entry, 'client')"
@ -234,9 +232,8 @@ function cancelInline() {
@keydown.enter="commitInline(entry)"
@keydown.escape="cancelInline"
/>
<Tooltip content="Double-click to edit">
<Tooltip v-else content="Double-click to edit">
<span
v-else
class="text-sm tabular-nums cursor-pointer hover:text-foreground transition-colors"
:class="entry.job_number ? 'text-foreground' : 'text-muted-foreground/40 italic'"
@dblclick="startInline(entry, 'job_number')"

View file

@ -6,7 +6,6 @@ import Card from '@/components/ui/Card.vue'
import CardHeader from '@/components/ui/CardHeader.vue'
import CardTitle from '@/components/ui/CardTitle.vue'
import CardContent from '@/components/ui/CardContent.vue'
import Spinner from '@/components/ui/Spinner.vue'
import Skeleton from '@/components/ui/Skeleton.vue'
import Input from '@/components/ui/Input.vue'
import Button from '@/components/ui/Button.vue'

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, computed, onMounted, watch } from 'vue'
import { ref, onMounted, watch } from 'vue'
import { useRouter } from 'vue-router'
import { dashboardApi } from '@/api/endpoints/dashboard'
import Card from '@/components/ui/Card.vue'