diff options
author | 2024-04-18 08:18:36 -0600 | |
---|---|---|
committer | 2024-04-18 08:18:36 -0600 | |
commit | c49723056acec489765acb54bae3889ac07f25af (patch) | |
tree | 58bea705d61a728b060e615ce514b8d4a7936c9e /src/electron | |
parent | feat: hide all services workspace (#1713) (diff) | |
download | ferdium-app-c49723056acec489765acb54bae3889ac07f25af.tar.gz ferdium-app-c49723056acec489765acb54bae3889ac07f25af.tar.zst ferdium-app-c49723056acec489765acb54bae3889ac07f25af.zip |
refactor: bring down eslint warnings to zero (#1714)
- install `@eslint-react/eslint-plugin` dependency
- configure `@eslint-react/eslint-plugin` in eslint config
- modernize `lint` command in `package.json`
- disable or fix various reported lint issues
- fix `div` being nested in `p` for settings
- replace deprecated `event.keyCode` with `event.key`
- update isEscKeyPress method and unit tests which used deprecated `event.keyCode`
- allow `eslint` v8 as peer dependency for `@eslint-react/eslint-plugin`
Diffstat (limited to 'src/electron')
-rw-r--r-- | src/electron/ipc-api/autoUpdate.ts | 1 | ||||
-rw-r--r-- | src/electron/ipc-api/index.ts | 1 | ||||
-rw-r--r-- | src/electron/macOSPermissions.ts | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/electron/ipc-api/autoUpdate.ts b/src/electron/ipc-api/autoUpdate.ts index 775daf602..44e2a1b19 100644 --- a/src/electron/ipc-api/autoUpdate.ts +++ b/src/electron/ipc-api/autoUpdate.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import { BrowserWindow, ipcMain } from 'electron'; | 1 | import { BrowserWindow, ipcMain } from 'electron'; |
2 | import { autoUpdater } from 'electron-updater'; | 2 | import { autoUpdater } from 'electron-updater'; |
3 | // eslint-disable-next-line import/no-cycle | ||
3 | import { appEvents } from '../..'; | 4 | import { appEvents } from '../..'; |
4 | 5 | ||
5 | const debug = require('../../preload-safe-debug')('Ferdium:ipcApi:autoUpdate'); | 6 | const debug = require('../../preload-safe-debug')('Ferdium:ipcApi:autoUpdate'); |
diff --git a/src/electron/ipc-api/index.ts b/src/electron/ipc-api/index.ts index 48c6d142c..83cc5eae2 100644 --- a/src/electron/ipc-api/index.ts +++ b/src/electron/ipc-api/index.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import type { BrowserWindow } from 'electron'; | 1 | import type { BrowserWindow } from 'electron'; |
2 | import type TrayIcon from '../../lib/Tray'; | 2 | import type TrayIcon from '../../lib/Tray'; |
3 | import appIndicator from './appIndicator'; | 3 | import appIndicator from './appIndicator'; |
4 | // eslint-disable-next-line import/no-cycle | ||
4 | import autoUpdate from './autoUpdate'; | 5 | import autoUpdate from './autoUpdate'; |
5 | import dnd from './dnd'; | 6 | import dnd from './dnd'; |
6 | import download from './download'; | 7 | import download from './download'; |
diff --git a/src/electron/macOSPermissions.ts b/src/electron/macOSPermissions.ts index 90f0f4028..a3bbbbe19 100644 --- a/src/electron/macOSPermissions.ts +++ b/src/electron/macOSPermissions.ts | |||
@@ -2,7 +2,7 @@ import { dirname } from 'node:path'; | |||
2 | import { type BrowserWindow, dialog, systemPreferences } from 'electron'; | 2 | import { type BrowserWindow, dialog, systemPreferences } from 'electron'; |
3 | import { mkdirSync, pathExistsSync, writeFileSync } from 'fs-extra'; | 3 | import { mkdirSync, pathExistsSync, writeFileSync } from 'fs-extra'; |
4 | import macosVersion from 'macos-version'; | 4 | import macosVersion from 'macos-version'; |
5 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error | 5 | // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error |
6 | // @ts-ignore | 6 | // @ts-ignore |
7 | import { askForScreenCaptureAccess } from 'node-mac-permissions'; | 7 | import { askForScreenCaptureAccess } from 'node-mac-permissions'; |
8 | import { userDataPath } from '../environment-remote'; | 8 | import { userDataPath } from '../environment-remote'; |