mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 22:09:08 +08:00
style: apply prefer-node-protocol lint rule (#5627)
it makes it perfectly clear that the package is a Node.js builtin module.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { ChildProcessWithoutNullStreams } from 'node:child_process';
|
||||
import { spawn } from 'node:child_process';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
import type { ChildProcessWithoutNullStreams } from 'child_process';
|
||||
import type { BuildContext } from 'esbuild';
|
||||
import * as esbuild from 'esbuild';
|
||||
import kill from 'tree-kill';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import path from 'node:path';
|
||||
|
||||
import type { Options as ElectronWinstallerOptions } from 'electron-winstaller';
|
||||
import { convertVersion, createWindowsInstaller } from 'electron-winstaller';
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
|
||||
import {
|
||||
arch,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
import {
|
||||
AppConfigStorage,
|
||||
defaultAppConfig,
|
||||
} from '@toeverything/infra/app-config-storage';
|
||||
import { app } from 'electron';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
const FILENAME = 'config.json';
|
||||
const FILEPATH = path.join(app.getPath('userData'), FILENAME);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import assert from 'node:assert';
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { BrowserWindow, type CookiesSetDetails, nativeTheme } from 'electron';
|
||||
import electronWindowState from 'electron-window-state';
|
||||
import { join } from 'path';
|
||||
|
||||
import { isMacOS, isWindows } from '../shared/utils';
|
||||
import { mainWindowOrigin } from './constants';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { BrowserWindow, type Display, screen } from 'electron';
|
||||
import { join } from 'path';
|
||||
|
||||
import { isMacOS } from '../shared/utils';
|
||||
import { mainWindowOrigin } from './constants';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { net, protocol, session } from 'electron';
|
||||
import { join } from 'path';
|
||||
|
||||
import { CLOUD_BASE_URL } from './config';
|
||||
import { logger } from './logger';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { parse } from 'node:url';
|
||||
|
||||
import { app, BrowserWindow, shell } from 'electron';
|
||||
import { parse } from 'url';
|
||||
|
||||
import { logger } from '../logger';
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import 'electron-updater'; // Prevent BaseUpdater is undefined.
|
||||
|
||||
import { randomBytes } from 'node:crypto';
|
||||
|
||||
import { type AllPublishOptions, UUID } from 'builder-util-runtime';
|
||||
import { randomBytes } from 'crypto';
|
||||
import type { AppAdapter } from 'electron-updater/out/AppAdapter';
|
||||
import type { DownloadUpdateOptions } from 'electron-updater/out/AppUpdater';
|
||||
import type { InstallOptions } from 'electron-updater/out/BaseUpdater';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { runCli } from '@magic-works/i18n-codegen';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
runCli(
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { runCli } from '@magic-works/i18n-codegen';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
runCli(
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import fs from 'fs';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
import * as glob from 'glob';
|
||||
import path from 'path';
|
||||
|
||||
// purpose: bundle all json files into one json file in onboarding folder
|
||||
const __dirname = new URL('.', import.meta.url).pathname;
|
||||
|
||||
Reference in New Issue
Block a user