- 修复 web-admin 与 desktop-client 侧边栏点击无反应:el-menu 的 index 是路径,不能当路由名使用 - 修复 Web 产物目录含点号目录(如 .cache)时 res.sendFile 因 dotfiles:ignore 返回 500 - 后端生产模式:静态托管 Web 端 + SPA 回退、helmet、限流(通用/登录)、trust proxy、 /healthz 与 /readyz、请求耗时日志、生产环境变量强校验、首启动自动迁移与创建管理员、PID 文件 - Web 管理端 PWA:manifest + service worker + 图标,可在浏览器安装为应用 - 新增服务端 + Web 管理端 Windows 安装程序(内置 Node 运行时、启停与服务脚本、开机自启、卸载保留数据) - 新增 Docker/Compose/Nginx 部署样例与 docs/production.md - 新增 UI 回归测试:Web 端 Electron 驱动真实点击 7 项、客户端冒烟 11 项(含侧边栏点击与离线回退)
93 lines
2.5 KiB
JavaScript
93 lines
2.5 KiB
JavaScript
import tseslint from 'typescript-eslint';
|
||
import pluginVue from 'eslint-plugin-vue';
|
||
import vueParser from 'vue-eslint-parser';
|
||
|
||
const sharedGlobals = {
|
||
console: 'readonly',
|
||
process: 'readonly',
|
||
Buffer: 'readonly',
|
||
__dirname: 'readonly',
|
||
__filename: 'readonly',
|
||
setTimeout: 'readonly',
|
||
clearTimeout: 'readonly',
|
||
setInterval: 'readonly',
|
||
clearInterval: 'readonly',
|
||
URL: 'readonly',
|
||
URLSearchParams: 'readonly',
|
||
fetch: 'readonly',
|
||
global: 'readonly',
|
||
};
|
||
|
||
export default tseslint.config(
|
||
{
|
||
ignores: [
|
||
'**/node_modules/**',
|
||
'**/dist/**',
|
||
'**/dist-electron/**',
|
||
'**/release/**',
|
||
'**/release-server/**',
|
||
'**/build/**',
|
||
'**/coverage/**',
|
||
'**/src/generated/**',
|
||
'**/.cache/**',
|
||
'**/.pnpm-store/**',
|
||
'**/.probe/**',
|
||
'**/*.d.ts',
|
||
],
|
||
},
|
||
...tseslint.configs.recommended,
|
||
...pluginVue.configs['flat/recommended'],
|
||
{
|
||
// Electron 主进程脚本(图标渲染、UI 冒烟)必须是 CommonJS,允许 require
|
||
files: ['**/*.cjs'],
|
||
languageOptions: {
|
||
ecmaVersion: 'latest',
|
||
sourceType: 'commonjs',
|
||
globals: sharedGlobals,
|
||
},
|
||
rules: {
|
||
'@typescript-eslint/no-require-imports': 'off',
|
||
'@typescript-eslint/no-var-requires': 'off',
|
||
},
|
||
},
|
||
{
|
||
files: ['**/*.vue'],
|
||
languageOptions: {
|
||
parser: vueParser,
|
||
parserOptions: {
|
||
parser: tseslint.parser,
|
||
ecmaVersion: 'latest',
|
||
sourceType: 'module',
|
||
extraFileExtensions: ['.vue'],
|
||
},
|
||
globals: sharedGlobals,
|
||
},
|
||
},
|
||
{
|
||
files: ['**/*.{ts,mts,cts,js,mjs,cjs,vue}'],
|
||
languageOptions: {
|
||
ecmaVersion: 'latest',
|
||
sourceType: 'module',
|
||
globals: sharedGlobals,
|
||
},
|
||
rules: {
|
||
'no-console': 'off',
|
||
'@typescript-eslint/no-explicit-any': 'warn',
|
||
'@typescript-eslint/no-unused-vars': [
|
||
'warn',
|
||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' },
|
||
],
|
||
'@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports' }],
|
||
// Vue 组件名使用多单词(Element Plus 视图文件均为 XxxView.vue)
|
||
'vue/multi-word-component-names': 'off',
|
||
'vue/max-attributes-per-line': 'off',
|
||
'vue/singleline-html-element-content-newline': 'off',
|
||
'vue/html-self-closing': 'off',
|
||
'vue/attributes-order': 'off',
|
||
'vue/html-indent': 'off',
|
||
'vue/html-closing-bracket-newline': 'off',
|
||
'vue/first-attribute-linebreak': 'off',
|
||
},
|
||
},
|
||
);
|