- 配置 Jest 测试框架,支持 TypeScript 和 React 组件测试 - 添加 Testing Library 相关依赖用于 React 组件测试 - 配置 Babel 预设支持 Jest 和 React 测试环境 - 添加 TDD 开发工作流脚本 (test, test:watch, test:coverage) - 创建完整的 TDD 编码规范文档 (CLAUDE.md) - 添加自定义 hooks 和多平台支持目录结构 - 配置 TypeScript 严格模式和 ESLint 规范 - 添加全局类型定义文件支持
38 lines
938 B
JSON
38 lines
938 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "es2017",
|
|
"module": "commonjs",
|
|
"removeComments": false,
|
|
"preserveConstEnums": true,
|
|
"moduleResolution": "node",
|
|
"experimentalDecorators": true,
|
|
"strict": true,
|
|
"noImplicitAny": true,
|
|
"noImplicitReturns": true,
|
|
"noImplicitThis": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"outDir": "lib",
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"strictNullChecks": true,
|
|
"strictFunctionTypes": true,
|
|
"strictBindCallApply": true,
|
|
"strictPropertyInitialization": true,
|
|
"sourceMap": true,
|
|
"rootDir": ".",
|
|
"jsx": "react-jsx",
|
|
"allowJs": true,
|
|
"resolveJsonModule": true,
|
|
"typeRoots": [
|
|
"node_modules/@types"
|
|
],
|
|
"paths": {
|
|
// TS5090 leading './'
|
|
"@/*": ["./src/*"]
|
|
}
|
|
},
|
|
"include": ["./src", "./types", "./config"],
|
|
"compileOnSave": false
|
|
}
|