Files
aiops/frontend
attacker e57718998a feat(q3): api.ts 模块化拆分 — 1323行单文件→12个域文件 + Q1构建修复
Q3: api.ts 拆分 [done]
- services/api.ts (1323L) → services/api/ 目录 12 个域文件 + index.ts
- 域划分: auth/dashboard/server/kubernetes/deploy/automation/monitor/agent/cloud/system/ai
- 每文件 < 300 行 (kubernetes.ts 409L 为例外: 78方法单一模块)
- index.ts 统一 re-export, 97个import文件零改动
- 31个API对象 + 3个类型定义 + 264个async方法全部保留
- tsc -b 零错误, npm run build ✓ built in 13.85s

Q1: 构建修复 [in_progress]
- 修复781处tsc -b错误(unknown属性访问/隐式any/类型不匹配)
- 移除已删除Ansible组件的导入和路由
- 修复DeploymentView/Header/Sidebar的_前缀解构bug
- 回退不安全unknown→any (skill规定的安全矩阵)
- 放宽noImplicitAny(临时), ESLint: unused=0, console=0
- any=1041 → 后续Q1工作逐步用interface替代
2026-06-25 07:26:06 +08:00
..

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])