xo: Fix import/no-duplicates.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-03-22 15:32:48 -07:00
parent 7072a41e01
commit 86e28f5b00
17 changed files with 41 additions and 46 deletions

View File

@@ -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";

View File

@@ -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";

View File

@@ -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";

View File

@@ -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,

View File

@@ -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";

View File

@@ -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";

View File

@@ -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";

View File

@@ -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";

View File

@@ -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,

View File

@@ -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;

View File

@@ -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 = {

View File

@@ -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";

View File

@@ -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;

View File

@@ -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";

View File

@@ -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";

View File

@@ -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";

View File

@@ -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";