mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-04 14:03:27 +00:00 
			
		
		
		
	xo: Fix unicorn/prefer-node-protocol.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
 | 
			
		||||
import * as Sentry from "@sentry/electron";
 | 
			
		||||
import {JsonDB} from "node-json-db";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
 | 
			
		||||
import {app} from "./remote";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import process from "process";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import type * as z from "zod";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import * as z from "zod";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import {shell} from "electron/common";
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import os from "os";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import os from "node:os";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
 | 
			
		||||
import {html} from "./html";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import {Console} from "console"; // eslint-disable-line node/prefer-global/console
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import os from "os";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import {Console} from "node:console";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import os from "node:os";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {initSetUp} from "./default-util";
 | 
			
		||||
import {app} from "./remote";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import process from "process";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
export const {app, dialog} =
 | 
			
		||||
  process.type === "renderer"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import path from "path";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
 | 
			
		||||
import i18n from "i18n";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import {shell} from "electron/common";
 | 
			
		||||
import {app, dialog, session} from "electron/main";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import util from "util";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
import util from "node:util";
 | 
			
		||||
 | 
			
		||||
import log from "electron-log";
 | 
			
		||||
import type {UpdateDownloadedEvent, UpdateInfo} from "electron-updater";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import {nativeImage} from "electron/common";
 | 
			
		||||
import type {BrowserWindow} from "electron/main";
 | 
			
		||||
import {app} from "electron/main";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../common/config-util";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,8 +5,8 @@ import type {
 | 
			
		||||
  WebContents,
 | 
			
		||||
} from "electron/main";
 | 
			
		||||
import {Notification, app} from "electron/main";
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../common/config-util";
 | 
			
		||||
import * as LinkUtil from "../common/link-util";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import type {IpcMainEvent, WebContents} from "electron/main";
 | 
			
		||||
import {BrowserWindow, app, dialog, powerMonitor, session} from "electron/main";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import * as remoteMain from "@electron/remote/main";
 | 
			
		||||
import windowStateKeeper from "electron-window-state";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import {app, dialog} from "electron/main";
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
 | 
			
		||||
import {JsonDB} from "node-json-db";
 | 
			
		||||
import {DataError} from "node-json-db/dist/lib/Errors";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import {shell} from "electron/common";
 | 
			
		||||
import type {MenuItemConstructorOptions} from "electron/main";
 | 
			
		||||
import {BrowserWindow, Menu, app} from "electron/main";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import AdmZip from "adm-zip";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
import type {ClientRequest, IncomingMessage, Session} from "electron/main";
 | 
			
		||||
import {app, net} from "electron/main";
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import stream from "stream";
 | 
			
		||||
import util from "util";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
import stream from "node:stream";
 | 
			
		||||
import util from "node:util";
 | 
			
		||||
 | 
			
		||||
import * as Sentry from "@sentry/electron";
 | 
			
		||||
import getStream from "get-stream";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
import {app} from "electron/main";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import AutoLaunch from "auto-launch";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import {Buffer} from "buffer";
 | 
			
		||||
import crypto from "crypto";
 | 
			
		||||
import {clipboard} from "electron/common";
 | 
			
		||||
import {Buffer} from "node:buffer";
 | 
			
		||||
import crypto from "node:crypto";
 | 
			
		||||
 | 
			
		||||
// This helper is exposed via electron_bridge for use in the social
 | 
			
		||||
// login flow.
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ import type {
 | 
			
		||||
  ContextMenuParams,
 | 
			
		||||
  MenuItemConstructorOptions,
 | 
			
		||||
} from "electron/renderer";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {Menu} from "@electron/remote";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import process from "process";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import type {Html} from "../../../common/html";
 | 
			
		||||
import {html} from "../../../common/html";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import type {WebContents} from "electron/main";
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import * as remote from "@electron/remote";
 | 
			
		||||
import {app, dialog} from "@electron/remote";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {EventEmitter} from "events";
 | 
			
		||||
import {EventEmitter} from "node:events";
 | 
			
		||||
 | 
			
		||||
import type {ClipboardDecrypter} from "./clipboard-decrypter";
 | 
			
		||||
import {ClipboardDecrypterImpl} from "./clipboard-decrypter";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import {clipboard} from "electron/common";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {Menu, app, dialog, session} from "@electron/remote";
 | 
			
		||||
import * as remote from "@electron/remote";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import type {OpenDialogOptions} from "electron/renderer";
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import * as remote from "@electron/remote";
 | 
			
		||||
import {app, dialog, session} from "@electron/remote";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import process from "process";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import type {DndSettings} from "../../../../common/dnd-util";
 | 
			
		||||
import {html} from "../../../../common/html";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import process from "process";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {html} from "../../../../common/html";
 | 
			
		||||
import * as LinkUtil from "../../../../common/link-util";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
import {contextBridge, webFrame} from "electron/renderer";
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
 | 
			
		||||
import electron_bridge, {bridgeEvents} from "./electron-bridge";
 | 
			
		||||
import * as NetworkError from "./pages/network";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
import type {NativeImage} from "electron/common";
 | 
			
		||||
import {nativeImage} from "electron/common";
 | 
			
		||||
import type {Tray as ElectronTray} from "electron/main";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import process from "process";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {BrowserWindow, Menu, Tray} from "@electron/remote";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
import fs from "fs";
 | 
			
		||||
import path from "path";
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
 | 
			
		||||
import {app, dialog} from "@electron/remote";
 | 
			
		||||
import * as Sentry from "@sentry/electron";
 | 
			
		||||
 
 | 
			
		||||
@@ -285,8 +285,7 @@
 | 
			
		||||
      ],
 | 
			
		||||
      "strict": "error",
 | 
			
		||||
      "unicorn/prefer-json-parse-buffer": "off",
 | 
			
		||||
      "unicorn/prefer-module": "off",
 | 
			
		||||
      "unicorn/prefer-node-protocol": "off"
 | 
			
		||||
      "unicorn/prefer-module": "off"
 | 
			
		||||
    },
 | 
			
		||||
    "envs": [
 | 
			
		||||
      "node",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user