From 706ffd48fd375768d0834322bcecda03ce39e4f4 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Fri, 24 May 2024 16:32:26 +0800 Subject: [PATCH] chore(lint): Update ESLint and Prettier configurations --- .eslintrc.cjs | 6 +++++- .prettierrc | 8 ++++++++ .prettierrc.yaml | 6 ------ src/main/index.ts | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 .prettierrc delete mode 100644 .prettierrc.yaml diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 63c97794..880582c7 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -5,5 +5,9 @@ module.exports = { 'plugin:react/jsx-runtime', '@electron-toolkit/eslint-config-ts/recommended', '@electron-toolkit/eslint-config-prettier' - ] + ], + rules: { + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off' + } } diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..83433021 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "singleQuote": true, + "semi": false, + "printWidth": 120, + "trailingComma": "none", + "endOfLine": "lf", + "bracketSameLine": true +} diff --git a/.prettierrc.yaml b/.prettierrc.yaml deleted file mode 100644 index 07b4f364..00000000 --- a/.prettierrc.yaml +++ /dev/null @@ -1,6 +0,0 @@ -singleQuote: true -semi: false -printWidth: 120 -trailingComma: none -endOfLine: lf -bracketSameLine: true diff --git a/src/main/index.ts b/src/main/index.ts index ecf5f751..4c671b16 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1,7 +1,7 @@ import { app, shell, BrowserWindow, ipcMain } from 'electron' import { join } from 'path' import { electronApp, optimizer, is } from '@electron-toolkit/utils' -import icon from '@/renderer/resources/icon.png?asset' +import icon from '../../resources/icon.png?asset' import windowStateKeeper from 'electron-window-state' function createWindow(): void {