mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-19 19:04:23 +08:00
6d2346f3b1
- 新增 `secscore://` 自定义 URL 协议,支持通过链接直接导航至应用内页面(如 `secscore://settings`)和控制悬浮侧边栏(如 `secscore://sidebar/toggle`) - 在系统托盘菜单中添加“显隐悬浮侧边栏”选项 - 在设置页面添加“URL 链接”选项卡,提供协议说明和手动注册按钮 - 应用支持单实例运行,后续协议调用将转发至现有实例 - 更新构建配置以注册 URL 协议,并添加详细的使用说明文档 - 修复 WindowManager 中可能因 settings 未初始化导致的潜在错误
39 lines
1.3 KiB
JavaScript
39 lines
1.3 KiB
JavaScript
import { defineConfig } from 'eslint/config'
|
|
import tseslint from '@electron-toolkit/eslint-config-ts'
|
|
import eslintConfigPrettier from '@electron-toolkit/eslint-config-prettier'
|
|
import eslintPluginReact from 'eslint-plugin-react'
|
|
import eslintPluginReactHooks from 'eslint-plugin-react-hooks'
|
|
import eslintPluginReactRefresh from 'eslint-plugin-react-refresh'
|
|
|
|
export default defineConfig(
|
|
{ ignores: ['**/node_modules', '**/dist', '**/out', 'scripts/**', 'secrandom_ipc_send_url.js'] },
|
|
tseslint.configs.recommended,
|
|
eslintPluginReact.configs.flat.recommended,
|
|
eslintPluginReact.configs.flat['jsx-runtime'],
|
|
{
|
|
settings: {
|
|
react: {
|
|
version: 'detect'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
plugins: {
|
|
'react-hooks': eslintPluginReactHooks,
|
|
'react-refresh': eslintPluginReactRefresh
|
|
},
|
|
rules: {
|
|
...eslintPluginReactHooks.configs.recommended.rules,
|
|
...eslintPluginReactRefresh.configs.vite.rules,
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'react-refresh/only-export-components': 'off',
|
|
'react-hooks/exhaustive-deps': 'warn',
|
|
'react-hooks/set-state-in-effect': 'off',
|
|
'@typescript-eslint/no-require-imports': 'off'
|
|
}
|
|
},
|
|
eslintConfigPrettier
|
|
)
|