Skip to content

Commit

Permalink
xo: Fix import/no-duplicates.
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk committed Mar 22, 2024
1 parent 7072a41 commit 86e28f5
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 46 deletions.
7 changes: 5 additions & 2 deletions app/main/autoupdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import {app, dialog, session} from "electron/main";
import process from "node:process";

import log from "electron-log/main";
import type {UpdateDownloadedEvent, UpdateInfo} from "electron-updater";
import {autoUpdater} from "electron-updater";
import {
type UpdateDownloadedEvent,
type UpdateInfo,
autoUpdater,
} from "electron-updater";

import * as ConfigUtil from "../common/config-util.js";

Expand Down
3 changes: 1 addition & 2 deletions app/main/badge-settings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {nativeImage} from "electron/common";
import type {BrowserWindow} from "electron/main";
import {app} from "electron/main";
import {type BrowserWindow, app} from "electron/main";
import process from "node:process";

import * as ConfigUtil from "../common/config-util.js";
Expand Down
14 changes: 7 additions & 7 deletions app/main/handle-external-link.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type {Event} from "electron/common";
import {shell} from "electron/common";
import type {
HandlerDetails,
SaveDialogOptions,
WebContents,
import {type Event, shell} from "electron/common";
import {
type HandlerDetails,
Notification,
type SaveDialogOptions,
type WebContents,
app,
} from "electron/main";
import {Notification, app} from "electron/main";
import fs from "node:fs";
import path from "node:path";

Expand Down
3 changes: 2 additions & 1 deletion app/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {clipboard} from "electron/common";
import type {IpcMainEvent, WebContents} from "electron/main";
import {
BrowserWindow,
type IpcMainEvent,
type WebContents,
app,
dialog,
powerMonitor,
Expand Down
3 changes: 1 addition & 2 deletions app/main/linuxupdater.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type {Session} from "electron/main";
import {Notification, app} from "electron/main";
import {Notification, type Session, app} from "electron/main";

import * as semver from "semver";
import {z} from "zod";
Expand Down
8 changes: 6 additions & 2 deletions app/main/menu.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import {shell} from "electron/common";
import type {MenuItemConstructorOptions} from "electron/main";
import {BrowserWindow, Menu, app} from "electron/main";
import {
BrowserWindow,
Menu,
type MenuItemConstructorOptions,
app,
} from "electron/main";
import process from "node:process";

import AdmZip from "adm-zip";
Expand Down
3 changes: 1 addition & 2 deletions app/main/request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type {Session} from "electron/main";
import {app} from "electron/main";
import {type Session, app} from "electron/main";
import fs from "node:fs";
import path from "node:path";
import {Readable} from "node:stream";
Expand Down
8 changes: 3 additions & 5 deletions app/main/typed-ipc-main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type {
IpcMainEvent,
IpcMainInvokeEvent,
WebContents,
} from "electron/main";
import {
type IpcMainEvent,
type IpcMainInvokeEvent,
type WebContents,
ipcMain as untypedIpcMain, // eslint-disable-line no-restricted-imports
} from "electron/main";

Expand Down
3 changes: 1 addition & 2 deletions app/renderer/js/components/context-menu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type {Event} from "electron/common";
import {clipboard} from "electron/common";
import {type Event, clipboard} from "electron/common";
import type {WebContents} from "electron/main";
import type {
ContextMenuParams,
Expand Down
6 changes: 2 additions & 4 deletions app/renderer/js/components/functional-tab.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type {Html} from "../../../common/html.js";
import {html} from "../../../common/html.js";
import {type Html, html} from "../../../common/html.js";

import {generateNodeFromHtml} from "./base.js";
import type {TabProps} from "./tab.js";
import Tab from "./tab.js";
import Tab, {type TabProps} from "./tab.js";

export type FunctionalTabProps = {
$view: Element;
Expand Down
6 changes: 2 additions & 4 deletions app/renderer/js/components/server-tab.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import process from "node:process";

import type {Html} from "../../../common/html.js";
import {html} from "../../../common/html.js";
import {type Html, html} from "../../../common/html.js";
import {ipcRenderer} from "../typed-ipc-renderer.js";

import {generateNodeFromHtml} from "./base.js";
import type {TabProps} from "./tab.js";
import Tab from "./tab.js";
import Tab, {type TabProps} from "./tab.js";
import type WebView from "./webview.js";

export type ServerTabProps = {
Expand Down
3 changes: 1 addition & 2 deletions app/renderer/js/components/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import * as remote from "@electron/remote";
import {app, dialog} from "@electron/remote";

import * as ConfigUtil from "../../../common/config-util.js";
import type {Html} from "../../../common/html.js";
import {html} from "../../../common/html.js";
import {type Html, html} from "../../../common/html.js";
import type {RendererMessage} from "../../../common/typed-ipc.js";
import type {TabRole} from "../../../common/types.js";
import preloadCss from "../../css/preload.css?raw";
Expand Down
9 changes: 5 additions & 4 deletions app/renderer/js/electron-bridge.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import {EventEmitter} from "node:events";

import type {ClipboardDecrypter} from "./clipboard-decrypter.js";
import {ClipboardDecrypterImpl} from "./clipboard-decrypter.js";
import type {NotificationData} from "./notification/index.js";
import {newNotification} from "./notification/index.js";
import {
type ClipboardDecrypter,
ClipboardDecrypterImpl,
} from "./clipboard-decrypter.js";
import {type NotificationData, newNotification} from "./notification/index.js";
import {ipcRenderer} from "./typed-ipc-renderer.js";

type ListenerType = (...args: any[]) => void;
Expand Down
3 changes: 1 addition & 2 deletions app/renderer/js/pages/preference/base-section.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type {Html} from "../../../../common/html.js";
import {html} from "../../../../common/html.js";
import {type Html, html} from "../../../../common/html.js";
import {generateNodeFromHtml} from "../../components/base.js";
import {ipcRenderer} from "../../typed-ipc-renderer.js";

Expand Down
3 changes: 1 addition & 2 deletions app/renderer/js/pages/preference/nav.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type {Html} from "../../../../common/html.js";
import {html} from "../../../../common/html.js";
import {type Html, html} from "../../../../common/html.js";
import * as t from "../../../../common/translation-util.js";
import type {NavItem} from "../../../../common/types.js";
import {generateNodeFromHtml} from "../../components/base.js";
Expand Down
3 changes: 1 addition & 2 deletions app/renderer/js/tray.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type {NativeImage} from "electron/common";
import {nativeImage} from "electron/common";
import {type NativeImage, nativeImage} from "electron/common";
import type {Tray as ElectronTray} from "electron/main";
import path from "node:path";
import process from "node:process";
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/js/typed-ipc-renderer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {IpcRendererEvent} from "electron/renderer";
import {
type IpcRendererEvent,
ipcRenderer as untypedIpcRenderer, // eslint-disable-line no-restricted-imports
} from "electron/renderer";

Expand Down

0 comments on commit 86e28f5

Please sign in to comment.