Bläddra i källkod

revert: 撤回前端模块类型导入问题修复中的临时绕过方案

本次提交撤回了 d051d33a 中的临时绕过方案,保留了根本性的修复:

## 保留的修复(正确的修复)
- allin-packages/disability-module 的类型导出修复
  - package.json 添加 routes/* 导出配置
  - 创建 person-extension.types.ts 前端专用类型定义文件
  - 导出纯类型避免循环依赖
  - 修复 disabled-person.service.ts 缺失的 TypeORM 类型导入

- yongren-talent-management-ui 包的类型导入修复
  - enterpriseDisabilityClient.ts: 使用 @d8d/allin-disability-module/routes 类型导入
  - TalentDetail.tsx: 直接从后端模块导入类型定义

- mini-shared-ui-components 的 RPC 客户端类型改进
  - 使用 @ts-expect-error 替代 @ts-ignore,添加注释说明

## 撤回的修复(临时绕过方案)
1. **TypeScript 配置统一修复** - 撤回所有 rencai-* 和 yongren-* 包的 tsconfig.json 中添加的 ../../allin-packages/** 到 exclude
2. **Taro UI 临时类型修复** - 撤回所有组件中添加的 @ts-nocheck 注释
3. **开发脚本优化** - 撤回 dev-with-logs.sh 中跳过 rencai 包构建的修改

原因:真正的类型导入问题已通过修复导入路径解决,不需要这些临时绕过方案。

Co-Authored-By: Claude <noreply@anthropic.com>
yourname 1 dag sedan
förälder
incheckning
29109cad6c

+ 0 - 1
mini-ui-packages/mini-enterprise-auth-ui/src/hooks/useAuth.tsx

@@ -1,4 +1,3 @@
-// @ts-nocheck - 类型推断问题,待修复
 import { createContext, useContext, PropsWithChildren } from 'react'
 import Taro from '@tarojs/taro'
 import { InferResponseType, InferRequestType } from 'hono'

+ 0 - 1
mini-ui-packages/mini-enterprise-auth-ui/src/pages/profile/Profile.tsx

@@ -1,4 +1,3 @@
-// @ts-nocheck - 类型检查问题,待修复
 import { useState } from 'react'
 import { View, Text, ScrollView } from '@tarojs/components'
 import Taro from '@tarojs/taro'

+ 5 - 20
mini-ui-packages/rencai-attendance-ui/tsconfig.json

@@ -2,10 +2,7 @@
   "compilerOptions": {
     "target": "ES5",
     "module": "ESNext",
-    "lib": [
-      "ES2020",
-      "DOM"
-    ],
+    "lib": ["ES2020", "DOM"],
     "moduleResolution": "bundler",
     "strict": true,
     "esModuleInterop": true,
@@ -21,24 +18,12 @@
     "allowSyntheticDefaultImports": true,
     "experimentalDecorators": true,
     "emitDecoratorMetadata": true,
-    "types": [
-      "react",
-      "node"
-    ],
+    "types": ["react", "node"],
     "baseUrl": ".",
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
+      "@/*": ["src/*"]
     }
   },
-  "include": [
-    "src/**/*",
-    "tests"
-  ],
-  "exclude": [
-    "node_modules",
-    "dist",
-    "../../allin-packages/**"
-  ]
+  "include": ["src/**/*", "tests"],
+  "exclude": ["node_modules", "dist"]
 }

+ 5 - 21
mini-ui-packages/rencai-auth-ui/tsconfig.json

@@ -2,10 +2,7 @@
   "compilerOptions": {
     "target": "ES5",
     "module": "ESNext",
-    "lib": [
-      "ES2020",
-      "DOM"
-    ],
+    "lib": ["ES2020", "DOM"],
     "moduleResolution": "bundler",
     "strict": true,
     "esModuleInterop": true,
@@ -21,25 +18,12 @@
     "allowSyntheticDefaultImports": true,
     "experimentalDecorators": true,
     "emitDecoratorMetadata": true,
-    "types": [
-      "jest",
-      "react",
-      "node"
-    ],
+    "types": ["jest", "react", "node"],
     "baseUrl": ".",
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
+      "@/*": ["src/*"]
     }
   },
-  "include": [
-    "src/**/*",
-    "tests"
-  ],
-  "exclude": [
-    "node_modules",
-    "dist",
-    "../../allin-packages/**"
-  ]
+  "include": ["src/**/*", "tests"],
+  "exclude": ["node_modules", "dist"]
 }

+ 0 - 1
mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx

@@ -1,4 +1,3 @@
-// @ts-nocheck - 类型推断问题,待修复
 import React, { useEffect } from 'react'
 import { View, Text, ScrollView } from '@tarojs/components'
 import Taro from '@tarojs/taro'

+ 8 - 24
mini-ui-packages/rencai-dashboard-ui/tsconfig.json

@@ -2,15 +2,12 @@
   "compilerOptions": {
     "target": "ES5",
     "module": "ESNext",
-    "lib": [
-      "ES2020",
-      "DOM"
-    ],
+    "lib": ["ES2020", "DOM"],
     "moduleResolution": "bundler",
-    "strict": false,
+    "strict": true,
     "esModuleInterop": true,
     "skipLibCheck": true,
-    "forceConsistentCasingInFileNames": false,
+    "forceConsistentCasingInFileNames": true,
     "declaration": true,
     "declarationMap": true,
     "sourceMap": true,
@@ -21,25 +18,12 @@
     "allowSyntheticDefaultImports": true,
     "experimentalDecorators": true,
     "emitDecoratorMetadata": true,
-    "types": [
-      "react",
-      "node"
-    ],
+    "types": ["react", "node"],
     "baseUrl": ".",
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
-    },
-    "noEmitOnError": false
+      "@/*": ["src/*"]
+    }
   },
-  "include": [
-    "src/**/*",
-    "tests"
-  ],
-  "exclude": [
-    "node_modules",
-    "dist",
-    "../../allin-packages/**"
-  ]
+  "include": ["src/**/*", "tests"],
+  "exclude": ["node_modules", "dist"]
 }

+ 5 - 20
mini-ui-packages/rencai-employment-ui/tsconfig.json

@@ -2,10 +2,7 @@
   "compilerOptions": {
     "target": "ES5",
     "module": "ESNext",
-    "lib": [
-      "ES2020",
-      "DOM"
-    ],
+    "lib": ["ES2020", "DOM"],
     "moduleResolution": "bundler",
     "strict": true,
     "esModuleInterop": true,
@@ -21,24 +18,12 @@
     "allowSyntheticDefaultImports": true,
     "experimentalDecorators": true,
     "emitDecoratorMetadata": true,
-    "types": [
-      "react",
-      "node"
-    ],
+    "types": ["react", "node"],
     "baseUrl": ".",
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
+      "@/*": ["src/*"]
     }
   },
-  "include": [
-    "src/**/*",
-    "tests"
-  ],
-  "exclude": [
-    "node_modules",
-    "dist",
-    "../../allin-packages/**"
-  ]
+  "include": ["src/**/*", "tests"],
+  "exclude": ["node_modules", "dist"]
 }

+ 5 - 20
mini-ui-packages/rencai-personal-info-ui/tsconfig.json

@@ -2,10 +2,7 @@
   "compilerOptions": {
     "target": "ES5",
     "module": "ESNext",
-    "lib": [
-      "ES2020",
-      "DOM"
-    ],
+    "lib": ["ES2020", "DOM"],
     "moduleResolution": "bundler",
     "strict": true,
     "esModuleInterop": true,
@@ -21,24 +18,12 @@
     "allowSyntheticDefaultImports": true,
     "experimentalDecorators": true,
     "emitDecoratorMetadata": true,
-    "types": [
-      "react",
-      "node"
-    ],
+    "types": ["react", "node"],
     "baseUrl": ".",
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
+      "@/*": ["src/*"]
     }
   },
-  "include": [
-    "src/**/*",
-    "tests"
-  ],
-  "exclude": [
-    "node_modules",
-    "dist",
-    "../../allin-packages/**"
-  ]
+  "include": ["src/**/*", "tests"],
+  "exclude": ["node_modules", "dist"]
 }

+ 5 - 20
mini-ui-packages/rencai-settings-ui/tsconfig.json

@@ -2,10 +2,7 @@
   "compilerOptions": {
     "target": "ES5",
     "module": "ESNext",
-    "lib": [
-      "ES2020",
-      "DOM"
-    ],
+    "lib": ["ES2020", "DOM"],
     "moduleResolution": "bundler",
     "strict": true,
     "esModuleInterop": true,
@@ -21,24 +18,12 @@
     "allowSyntheticDefaultImports": true,
     "experimentalDecorators": true,
     "emitDecoratorMetadata": true,
-    "types": [
-      "react",
-      "node"
-    ],
+    "types": ["react", "node"],
     "baseUrl": ".",
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
+      "@/*": ["src/*"]
     }
   },
-  "include": [
-    "src/**/*",
-    "tests"
-  ],
-  "exclude": [
-    "node_modules",
-    "dist",
-    "../../allin-packages/**"
-  ]
+  "include": ["src/**/*", "tests"],
+  "exclude": ["node_modules", "dist"]
 }

+ 5 - 20
mini-ui-packages/rencai-shared-ui/tsconfig.json

@@ -2,10 +2,7 @@
   "compilerOptions": {
     "target": "ES5",
     "module": "ESNext",
-    "lib": [
-      "ES2020",
-      "DOM"
-    ],
+    "lib": ["ES2020", "DOM"],
     "moduleResolution": "bundler",
     "strict": true,
     "esModuleInterop": true,
@@ -21,24 +18,12 @@
     "allowSyntheticDefaultImports": true,
     "experimentalDecorators": true,
     "emitDecoratorMetadata": true,
-    "types": [
-      "react",
-      "node"
-    ],
+    "types": ["react", "node"],
     "baseUrl": ".",
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
+      "@/*": ["src/*"]
     }
   },
-  "include": [
-    "src/**/*",
-    "tests"
-  ],
-  "exclude": [
-    "node_modules",
-    "dist",
-    "../../allin-packages/**"
-  ]
+  "include": ["src/**/*", "tests"],
+  "exclude": ["node_modules", "dist"]
 }

+ 0 - 1
mini-ui-packages/yongren-dashboard-ui/src/pages/Dashboard/Dashboard.tsx

@@ -1,4 +1,3 @@
-// @ts-nocheck - 类型推断问题,待修复
 import React, { useEffect, useState } from 'react'
 import { View, Text, ScrollView } from '@tarojs/components'
 import Taro from '@tarojs/taro'

+ 0 - 1
mini-ui-packages/yongren-order-management-ui/src/api/types.ts

@@ -1,4 +1,3 @@
-// @ts-nocheck - 类型推断问题,待修复
 import type { InferResponseType, InferRequestType } from 'hono/client';
 import { enterpriseOrderClient } from './enterpriseOrderClient';
 

+ 2 - 3
mini-ui-packages/yongren-order-management-ui/src/pages/OrderDetail/OrderDetail.tsx

@@ -1,11 +1,10 @@
-// @ts-nocheck - 类型推断问题,待修复
 import React, { useState, useEffect } from 'react'
-import { View, Text, ScrollView, Picker } from '@tarojs/components'
+import { View, Text, ScrollView, Input, Picker } from '@tarojs/components'
 import Taro from '@tarojs/taro'
 import { useQuery } from '@tanstack/react-query'
 import { Navbar } from '@d8d/mini-shared-ui-components/components/navbar'
 import { enterpriseOrderClient } from '../../api'
-import type { CompanyVideosResponse, CheckinStatisticsResponse, VideoStatisticsResponse } from '../../api'
+import type { OrderDetailResponse, CompanyVideosResponse, CheckinStatisticsResponse, VideoStatisticsResponse } from '../../api'
 
 
 interface OrderDetailData {

+ 0 - 1
mini-ui-packages/yongren-order-management-ui/src/pages/OrderList/OrderList.tsx

@@ -1,4 +1,3 @@
-// @ts-nocheck - 类型推断问题,待修复
 import React, { useState } from 'react'
 import { View, Text, ScrollView, Input } from '@tarojs/components'
 import Taro, { useDidShow } from '@tarojs/taro'

+ 0 - 1
mini-ui-packages/yongren-settings-ui/src/pages/Settings/Settings.tsx

@@ -1,4 +1,3 @@
-// @ts-nocheck - 类型推断问题,待修复
 import React from 'react'
 import { View, Text, ScrollView } from '@tarojs/components'
 import Taro from '@tarojs/taro'

+ 0 - 1
mini-ui-packages/yongren-statistics-ui/src/pages/Statistics/Statistics.tsx

@@ -1,4 +1,3 @@
-// @ts-nocheck - 类型推断问题,待修复
 import React, { useState, useEffect, memo, useMemo } from 'react'
 import { View, Text, ScrollView, Picker } from '@tarojs/components'
 import { useQuery } from '@tanstack/react-query'

+ 1 - 1
mini-ui-packages/yongren-talent-management-ui/tsconfig.json

@@ -25,5 +25,5 @@
     }
   },
   "include": ["src/**/*", "tests"],
-  "exclude": ["node_modules", "dist", "../../allin-packages/**"]
+  "exclude": ["node_modules", "dist"]
 }

+ 1 - 2
scripts/dev-with-logs.sh

@@ -13,8 +13,7 @@ echo "" >> "$CURRENT_LOG"
 echo "===== SESSION START: $(date) =====" >> "$CURRENT_LOG"
 
 # 运行并记录到两个文件(current + timestamped)
-# 暂时只构建 common 和 yongren 包,跳过 rencai 包(构建超时)
-pnpm run build:mini-ui-packages:common && pnpm run build:mini-ui-packages:yongren && concurrently \
+pnpm run build:mini-ui-packages && concurrently \
   "pnpm run dev:mini" \
   "pnpm run dev:mini-talent" \
   "pnpm run dev:weapp" \