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,44 +1,40 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ThunderboltOutlined,
|
||||
ClockCircleOutlined,
|
||||
} from "@ant-design/icons-vue";
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { ClockCircleOutlined, ThunderboltOutlined } from '@ant-design/icons-vue'
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import CustomArticleTab from "@/components/CustomArticleTab.vue";
|
||||
import InstantTaskTab from "@/components/InstantTaskTab.vue";
|
||||
import PromptRuleTab from "@/components/PromptRuleTab.vue";
|
||||
import ScheduleTaskTab from "@/components/ScheduleTaskTab.vue";
|
||||
import InstantGenerateModal from "@/components/InstantGenerateModal.vue";
|
||||
import ScheduleTaskModal from "@/components/ScheduleTaskModal.vue";
|
||||
import CustomArticleTab from '@/components/CustomArticleTab.vue'
|
||||
import InstantGenerateModal from '@/components/InstantGenerateModal.vue'
|
||||
import InstantTaskTab from '@/components/InstantTaskTab.vue'
|
||||
import PromptRuleTab from '@/components/PromptRuleTab.vue'
|
||||
import ScheduleTaskModal from '@/components/ScheduleTaskModal.vue'
|
||||
import ScheduleTaskTab from '@/components/ScheduleTaskTab.vue'
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t } = useI18n()
|
||||
|
||||
const activeTab = ref("articles");
|
||||
const instantModalOpen = ref(false);
|
||||
const scheduleModalOpen = ref(false);
|
||||
const activeTab = ref('articles')
|
||||
const instantModalOpen = ref(false)
|
||||
const scheduleModalOpen = ref(false)
|
||||
|
||||
function openInstantModal(): void {
|
||||
instantModalOpen.value = true;
|
||||
instantModalOpen.value = true
|
||||
}
|
||||
|
||||
function openScheduleModal(): void {
|
||||
scheduleModalOpen.value = true;
|
||||
scheduleModalOpen.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="custom-view">
|
||||
|
||||
<section class="custom-view__cards">
|
||||
<div class="custom-view__card custom-view__card--instant" @click="openInstantModal">
|
||||
<div class="custom-view__card-icon custom-view__card-icon--instant">
|
||||
<ThunderboltOutlined />
|
||||
</div>
|
||||
<div>
|
||||
<h4>{{ t("custom.cards.instantTitle") }}</h4>
|
||||
<p>{{ t("custom.cards.instantDesc") }}</p>
|
||||
<h4>{{ t('custom.cards.instantTitle') }}</h4>
|
||||
<p>{{ t('custom.cards.instantDesc') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-view__card custom-view__card--schedule" @click="openScheduleModal">
|
||||
@@ -46,8 +42,8 @@ function openScheduleModal(): void {
|
||||
<ClockCircleOutlined />
|
||||
</div>
|
||||
<div>
|
||||
<h4>{{ t("custom.cards.scheduleTitle") }}</h4>
|
||||
<p>{{ t("custom.cards.scheduleDesc") }}</p>
|
||||
<h4>{{ t('custom.cards.scheduleTitle') }}</h4>
|
||||
<p>{{ t('custom.cards.scheduleDesc') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -96,7 +92,9 @@ function openScheduleModal(): void {
|
||||
border: 1px solid #e6edf5;
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
transition:
|
||||
transform 0.2s,
|
||||
box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.custom-view__card:hover {
|
||||
|
||||
Reference in New Issue
Block a user