fix: 清理 unused-vars 回归(32→0) + 修复 go:embed 编译阻塞
1. ESLint unused-vars 从 32 清零(回归修复) - 删除 14 个文件中未使用的 import(lucide 图标/shadcn 组件/JsonData 类型) - 移除未使用的变量/参数(categoryLabels/updateEntry/onSaved 等) - 涉及: AppRelease/PipelineEditor/KubernetesNodes/AlertCenter/SilenceRulesPanel 等 2. 修复 go:embed all:static 编译阻塞 - 新增 backend/static/.gitkeep 占位文件 - 全新 clone 后 go build ./... 可直接通过(不再依赖先 npm run build) 3. 安装缺失的 npm 依赖 - react-markdown/remark-gfm(AgentMarkdown 组件) - @codemirror/lang-python/@codemirror/legacy-modes(ScriptCodeEditor 组件) 验证: go build✅ | tsc -b✅ | npm build✅(21s) | ESLint any=41 unused=0 | 17/17 集成测试✅
This commit is contained in:
1 parent
471353e3d7
commit
cde7bbe540
23 files changed
+31
-35
No files matched your search
@@ -210,12 +210,6 @@ function WorkflowEditorModal({ workflow, users, onClose, onSaved }: EditorProps)
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
const [error, setError] = useState('');
|
||||
|
||||
const categoryLabels: Record<string, string> = {
|
||||
resource: t('approval.category.resource'),
|
||||
app: t('approval.category.app'),
|
||||
permission: t('approval.category.permission'),
|
||||
};
|
||||
|
||||
const stepTypeLabels: Record<string, string> = {
|
||||
submit: t('approval.step.submit'),
|
||||
audit: t('approval.step.audit'),
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useState, useEffect, useCallback, useMemo, useRef } from 'react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useVirtualizer } from '@tanstack/react-virtual';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
|
||||
@@ -64,7 +64,6 @@ function ChartBody({
|
||||
unit,
|
||||
yDomain,
|
||||
gradPrefix,
|
||||
zoomRange,
|
||||
refLeft,
|
||||
refRight,
|
||||
onMouseDown,
|
||||
|
||||
@@ -168,7 +168,7 @@ export function buildMetricsFromHistory(history: JsonData[], timeConfig: TimeCon
|
||||
}
|
||||
|
||||
/** 从过滤后历史计算实际数据时间跨度(用于展示) // Logan.Li */
|
||||
export function getActualDataSpan(history: JsonData[], range: HostMonitorTimeRange): string | null {
|
||||
export function getActualDataSpan(history: JsonData[], _range: HostMonitorTimeRange): string | null {
|
||||
if (!history.length) return null;
|
||||
const ts = history.map(recordTimestamp).filter((t) => t > 0);
|
||||
if (!ts.length) return null;
|
||||
|
||||
Reference in new issue
Block a user