mirror of
https://github.com/Silentely/eSIM-Tools.git
synced 2026-09-03 06:24:20 +08:00
- 新增统一的中间件模块,提供鉴权、CORS和错误处理功能 - 重构所有Functions使用withAuth中间件简化代码结构 - 添加安全存储模块替代localStorage,防御XSS攻击 - 引入HTML清理工具,自动转义特殊字符和验证URL安全性 - 创建代码质量检查脚本,验证语法、环境变量和依赖完整性 - 添加构建日志工具和重构脚本,统一替换console.log为Logger - 引入ESLint配置,提升代码质量和一致性 - 重构Giffgaff相关API,统一错误处理和验证逻辑 - 优化构建脚本,添加压缩和图片优化功能 - 新增健康检查端点,用于服务监控和状态报告
33 lines
803 B
JSON
33 lines
803 B
JSON
{
|
|
"env": {
|
|
"browser": true,
|
|
"es2021": true,
|
|
"node": true
|
|
},
|
|
"extends": "eslint:recommended",
|
|
"parserOptions": {
|
|
"ecmaVersion": "latest",
|
|
"sourceType": "module"
|
|
},
|
|
"rules": {
|
|
"no-console": ["warn", { "allow": ["warn", "error"] }],
|
|
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
|
|
"prefer-const": "error",
|
|
"no-var": "error",
|
|
"eqeqeq": ["error", "always"],
|
|
"curly": ["error", "all"],
|
|
"brace-style": ["error", "1tbs"],
|
|
"indent": ["error", 2],
|
|
"quotes": ["error", "single", { "avoidEscape": true }],
|
|
"semi": ["error", "always"],
|
|
"no-eval": "error",
|
|
"no-implied-eval": "error",
|
|
"no-new-func": "error",
|
|
"no-script-url": "error",
|
|
"no-unsafe-innerHTML": "off"
|
|
},
|
|
"globals": {
|
|
"Deno": "readonly"
|
|
}
|
|
}
|