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:
attacker committed 2026-07-02 00:08:23 +08:00
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'),