chore(frontend): introduce prettier + eslint and prune unused code
- Add Prettier 3 with prettier-plugin-organize-imports (sorts/removes unused imports) - Add ESLint 10 flat config with typescript-eslint + eslint-plugin-vue + eslint-config-prettier - Add root scripts: format, format:check, lint, lint:fix - Reformat 257 files across admin-web, ops-web, desktop-client, packages - Remove unused locals/exports flagged by --noUnusedLocals/--noUnusedParameters - Fix duplicate localTabLabel key, surrogate-pair regex u-flag, NBSP literal in regex - Skip server/ (Go) and apps/browser-extension/ (deprecated per ADR) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,31 +1,35 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { UserOutlined, TagOutlined, TeamOutlined, ThunderboltOutlined } from "@ant-design/icons-vue";
|
||||
import type { KolPackageSummary } from "@geo/shared-types";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { TagOutlined, TeamOutlined, ThunderboltOutlined, UserOutlined } from '@ant-design/icons-vue'
|
||||
import type { KolPackageSummary } from '@geo/shared-types'
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { resolveApiURL } from "@/lib/api";
|
||||
import { resolveApiURL } from '@/lib/api'
|
||||
|
||||
const props = defineProps<{
|
||||
package: KolPackageSummary;
|
||||
}>();
|
||||
package: KolPackageSummary
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: "click", id: number): void;
|
||||
}>();
|
||||
(e: 'click', id: number): void
|
||||
}>()
|
||||
|
||||
const { t } = useI18n();
|
||||
const coverUrl = computed(() => resolveApiURL(props.package.cover_url));
|
||||
const { t } = useI18n()
|
||||
const coverUrl = computed(() => resolveApiURL(props.package.cover_url))
|
||||
|
||||
function handleClick() {
|
||||
emit("click", props.package.id);
|
||||
emit('click', props.package.id)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-card hoverable class="kol-package-card" @click="handleClick">
|
||||
<template #cover>
|
||||
<div v-if="coverUrl" class="card-cover-image" :style="{ backgroundImage: `url(${coverUrl})` }">
|
||||
<div
|
||||
v-if="coverUrl"
|
||||
class="card-cover-image"
|
||||
:style="{ backgroundImage: `url(${coverUrl})` }"
|
||||
>
|
||||
<img alt="cover" :src="coverUrl" />
|
||||
</div>
|
||||
<div v-else class="card-cover-fallback">
|
||||
@@ -46,7 +50,7 @@ function handleClick() {
|
||||
</a-avatar>
|
||||
<span class="kol-name">{{ props.package.kol_display_name }}</span>
|
||||
</div>
|
||||
<div class="industry-badge" v-if="props.package.industry">
|
||||
<div v-if="props.package.industry" class="industry-badge">
|
||||
<a-tag color="blue">
|
||||
<template #icon><TagOutlined /></template>
|
||||
{{ props.package.industry }}
|
||||
@@ -95,7 +99,7 @@ function handleClick() {
|
||||
}
|
||||
|
||||
.card-cover-image::before {
|
||||
content: "";
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: -16px;
|
||||
z-index: 0;
|
||||
@@ -106,7 +110,7 @@ function handleClick() {
|
||||
}
|
||||
|
||||
.card-cover-image::after {
|
||||
content: "";
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
|
||||
Reference in New Issue
Block a user