mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 10:45:57 +08:00
style: enable import-x/no-duplicates (#6279)
This commit is contained in:
@@ -16,8 +16,7 @@ import createEmotionCache from '@affine/core/utils/create-emotion-cache';
|
||||
import { configureWebServices } from '@affine/core/web';
|
||||
import { createI18n, setUpLanguage } from '@affine/i18n';
|
||||
import { CacheProvider } from '@emotion/react';
|
||||
import { getCurrentStore } from '@toeverything/infra';
|
||||
import { ServiceCollection } from '@toeverything/infra';
|
||||
import { getCurrentStore, ServiceCollection } from '@toeverything/infra';
|
||||
import mixpanel from 'mixpanel-browser';
|
||||
import type { PropsWithChildren, ReactElement } from 'react';
|
||||
import { lazy, Suspense } from 'react';
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import {
|
||||
type InsertRow,
|
||||
SqliteConnection,
|
||||
ValidationResult,
|
||||
} from '@affine/native';
|
||||
import type { InsertRow } from '@affine/native';
|
||||
import { SqliteConnection, ValidationResult } from '@affine/native';
|
||||
import { WorkspaceVersion } from '@toeverything/infra';
|
||||
|
||||
import { applyGuidCompatibilityFix, migrateToLatest } from '../db/migration';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { Subject } from 'rxjs';
|
||||
import { Observable } from 'rxjs';
|
||||
import {
|
||||
concat,
|
||||
defer,
|
||||
@@ -8,6 +7,7 @@ import {
|
||||
interval,
|
||||
lastValueFrom,
|
||||
merge,
|
||||
Observable,
|
||||
} from 'rxjs';
|
||||
import {
|
||||
concatMap,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { clipboard, type IpcMainInvokeEvent, nativeImage } from 'electron';
|
||||
import type { IpcMainInvokeEvent } from 'electron';
|
||||
import { clipboard, nativeImage } from 'electron';
|
||||
|
||||
import type { NamespaceHandlers } from '../type';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import path from 'node:path';
|
||||
|
||||
import { type App, type BrowserWindow, ipcMain } from 'electron';
|
||||
import type { App, BrowserWindow } from 'electron';
|
||||
import { ipcMain } from 'electron';
|
||||
|
||||
import { buildType, CLOUD_BASE_URL, isDev } from './config';
|
||||
import { mainWindowOrigin } from './constants';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import path from 'node:path';
|
||||
|
||||
import { type _AsyncVersionOf, AsyncCall } from 'async-call-rpc';
|
||||
import type { _AsyncVersionOf } from 'async-call-rpc';
|
||||
import { AsyncCall } from 'async-call-rpc';
|
||||
import type { UtilityProcess, WebContents } from 'electron';
|
||||
import {
|
||||
app,
|
||||
dialog,
|
||||
MessageChannelMain,
|
||||
shell,
|
||||
type UtilityProcess,
|
||||
utilityProcess,
|
||||
type WebContents,
|
||||
} from 'electron';
|
||||
|
||||
import type { HelperToMain, MainToHelper } from '../shared/type';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { shell } from 'electron';
|
||||
import { app } from 'electron';
|
||||
import { app, shell } from 'electron';
|
||||
import log from 'electron-log';
|
||||
|
||||
export const logger = log.scope('main');
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import assert from 'node:assert';
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { BrowserWindow, type CookiesSetDetails, nativeTheme } from 'electron';
|
||||
import type { CookiesSetDetails } from 'electron';
|
||||
import { BrowserWindow, nativeTheme } from 'electron';
|
||||
import electronWindowState from 'electron-window-state';
|
||||
|
||||
import { isLinux, isMacOS, isWindows } from '../shared/utils';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { BrowserWindow, type Display, screen } from 'electron';
|
||||
import type { Display } from 'electron';
|
||||
import { BrowserWindow, screen } from 'electron';
|
||||
|
||||
import { isMacOS } from '../shared/utils';
|
||||
import { mainWindowOrigin } from './constants';
|
||||
|
||||
@@ -6,16 +6,16 @@ import type {
|
||||
XElement,
|
||||
} from 'builder-util-runtime';
|
||||
import { HttpError, newError, parseXml } from 'builder-util-runtime';
|
||||
import {
|
||||
type AppUpdater,
|
||||
CancellationToken,
|
||||
type ResolvedUpdateFileInfo,
|
||||
type UpdateInfo,
|
||||
import type {
|
||||
AppUpdater,
|
||||
ResolvedUpdateFileInfo,
|
||||
UpdateInfo,
|
||||
} from 'electron-updater';
|
||||
import { CancellationToken } from 'electron-updater';
|
||||
import { BaseGitHubProvider } from 'electron-updater/out/providers/GitHubProvider';
|
||||
import type { ProviderRuntimeOptions } from 'electron-updater/out/providers/Provider';
|
||||
import {
|
||||
parseUpdateInfo,
|
||||
type ProviderRuntimeOptions,
|
||||
resolveFiles,
|
||||
} from 'electron-updater/out/providers/Provider';
|
||||
import * as semver from 'semver';
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { app, type IpcMainInvokeEvent } from 'electron';
|
||||
import type { IpcMainInvokeEvent } from 'electron';
|
||||
import { app } from 'electron';
|
||||
|
||||
import type { NamespaceHandlers } from '../type';
|
||||
import type { UpdaterConfig } from './electron-updater';
|
||||
import {
|
||||
checkForUpdates,
|
||||
downloadUpdate,
|
||||
getConfig,
|
||||
quitAndInstall,
|
||||
setConfig,
|
||||
type UpdaterConfig,
|
||||
} from './electron-updater';
|
||||
|
||||
export const updaterHandlers = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Please add modules to `external` in `rollupOptions` to avoid wrong bundling.
|
||||
import { AsyncCall, type EventBasedChannel } from 'async-call-rpc';
|
||||
import type { EventBasedChannel } from 'async-call-rpc';
|
||||
import { AsyncCall } from 'async-call-rpc';
|
||||
import { ipcRenderer } from 'electron';
|
||||
import { Subject } from 'rxjs';
|
||||
import { z } from 'zod';
|
||||
|
||||
@@ -2,7 +2,8 @@ import 'electron-updater'; // Prevent BaseUpdater is undefined.
|
||||
|
||||
import { randomBytes } from 'node:crypto';
|
||||
|
||||
import { type AllPublishOptions, UUID } from 'builder-util-runtime';
|
||||
import type { AllPublishOptions } from 'builder-util-runtime';
|
||||
import { UUID } from 'builder-util-runtime';
|
||||
import type { AppAdapter } from 'electron-updater/out/AppAdapter';
|
||||
import type { DownloadUpdateOptions } from 'electron-updater/out/AppUpdater';
|
||||
import type { InstallOptions } from 'electron-updater/out/BaseUpdater';
|
||||
|
||||
Reference in New Issue
Block a user