eda30250c6
- electron/* -> src/main/* (主进程) - electron/preload.ts -> src/preload/index.ts (预加载) - src/electron-api.d.ts -> src/preload/index.d.ts (类型声明) - src/* -> src/renderer/src/* (渲染进程) - src/index.html -> src/renderer/index.html - electron.vite.config.ts 简化为自动入口检测 (零配置) - tsconfig.app.json -> tsconfig.web.json, 更新 includes/paths - 构建产物 dist-electron/ -> out/ (修复 main/preload 输出覆盖 bug) - 更新 package.json main 字段 + electron-builder files - 更新 .gitignore + eslint ignores - 更新 AGENTS.md 架构文档
43 lines
1.0 KiB
JavaScript
43 lines
1.0 KiB
JavaScript
import js from '@eslint/js'
|
|
import globals from 'globals'
|
|
import tseslint from 'typescript-eslint'
|
|
import vue from 'eslint-plugin-vue'
|
|
import vueParser from 'vue-eslint-parser'
|
|
|
|
const commonLanguageOptions = {
|
|
ecmaVersion: 2023,
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
}
|
|
|
|
export default tseslint.config(
|
|
{ ignores: ['dist', 'out', 'release', 'coverage', 'node_modules'] },
|
|
{
|
|
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
files: ['**/*.ts'],
|
|
languageOptions: commonLanguageOptions,
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
},
|
|
},
|
|
...vue.configs['flat/essential'],
|
|
{
|
|
extends: [...tseslint.configs.recommended],
|
|
files: ['**/*.vue'],
|
|
languageOptions: {
|
|
...commonLanguageOptions,
|
|
parser: vueParser,
|
|
parserOptions: {
|
|
parser: tseslint.parser,
|
|
sourceType: 'module',
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
'vue/multi-word-component-names': 'off',
|
|
},
|
|
}
|
|
)
|