57ea4d9858
- **docs**: 完善组件注释、README 目录结构及 AGENTS.md 文档。 - **refactor**: - 提取通用 `PageHeader`、`Button`、`DashboardCard` 及 `ErrorBoundary` 组件。 - 重构消息通信机制,采用 `@webext-core/messaging` 实现类型安全。 - 将全局通知系统重构为 `SnackbarProvider` (后合并至 `GlobalSnackbar`)。 - 迁移样式系统至 MUI 主题,移除冗余 CSS。 - 优化路由配置,支持独立标签页模式及页面懒加载。 - 移除未使用文件、URL 工具及表单映射相关功能。 - **feat**: - 新增配置导出功能(JSON)及状态提示。 - 新增侧边栏状态变化通知机制。 - 新增文本统计及 JWT 解析工具。 - 优化二维码生成与解析逻辑,换用更轻量的 `qrious` 和 `qr-scanner`。 - 增强高亮器功能,支持闪烁效果及 Shadow DOM 穿透。 - **style**: 优化仪表盘响应式网格布局及 UI 细节。 - **fix**: 修复 `useStorageState` 依赖缺失及路由初始化性能问题。 - **test**: 更新单元测试以覆盖新增的工具函数及功能特性。
47 lines
1.4 KiB
JSON
47 lines
1.4 KiB
JSON
{
|
|
"extends": "./.wxt/tsconfig.json",
|
|
"compilerOptions": {
|
|
"allowImportingTsExtensions": true,
|
|
"jsx": "react-jsx",
|
|
"esModuleInterop": true,
|
|
"module": "ESNext", // 支持 import.meta
|
|
"moduleResolution": "Bundler", // 或者用 "Node"
|
|
"strict": true,
|
|
|
|
/* --- 代码质量检查 --- */
|
|
// 声明了但没使用的变量报错(防止代码冗余)
|
|
"noUnusedLocals": true,
|
|
// 函数参数没使用报错
|
|
"noUnusedParameters": true,
|
|
// 函数必须有返回值,防止遗漏 return
|
|
"noImplicitReturns": true,
|
|
// switch 语句没有 break 时报错
|
|
"noFallthroughCasesInSwitch": true,
|
|
|
|
/* --- 路径与环境 --- */
|
|
// 确保包含 DOM 类型(解决 setTimeout、document 等报错)
|
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
// 编译目标设置为最新,WXT 底层 Vite 会处理降级兼容
|
|
"target": "ESNext",
|
|
|
|
"types": ["chrome", "webextension-polyfill", "@testing-library/jest-dom", "vitest/globals"],
|
|
"noImplicitAny": false
|
|
},
|
|
// 确保包含你的源代码目录
|
|
"include": [
|
|
"vite-env.d.ts",
|
|
"entrypoints/**/*",
|
|
"pages/**/*",
|
|
"components/**/*",
|
|
"utils/**/*",
|
|
"types/**/*",
|
|
"assets/**/*",
|
|
"hooks/**/*",
|
|
".wxt/types/**/*.ts",
|
|
".wxt/types/*.d.ts",
|
|
"components",
|
|
"eslint.config.ts"
|
|
],
|
|
"exclude": ["node_modules", ".wxt", "dist"]
|
|
}
|