chore: bump oxlint & enable more supported rules (#14769)
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
"@radix-ui/react-tooltip": "^1.1.5",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@tanstack/react-table": "^8.20.5",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"@toeverything/theme": "^1.1.23",
|
||||
"cmdk": "^1.0.4",
|
||||
"embla-carousel-react": "^8.5.1",
|
||||
@@ -56,16 +55,13 @@
|
||||
"recharts": "^2.15.4",
|
||||
"sonner": "^2.0.7",
|
||||
"swr": "^2.3.7",
|
||||
"vaul": "^1.1.2",
|
||||
"zod": "^3.25.76"
|
||||
"vaul": "^1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/react": "^16.3.2",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"cross-env": "^10.1.0",
|
||||
"shadcn-ui": "^0.9.5",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
"tailwindcss": "^4.1.17",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
|
||||
@@ -5,5 +5,5 @@ import { createRoot } from 'react-dom/client';
|
||||
|
||||
import { App } from './app';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
createRoot(document.getElementById('app')!).render(<App />);
|
||||
|
||||
@@ -323,7 +323,7 @@ export const useExportUsers = () => {
|
||||
});
|
||||
dataToCopy.push(row);
|
||||
});
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
navigator.clipboard.writeText(JSON.stringify(dataToCopy, null, 2));
|
||||
callback?.();
|
||||
},
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
{ "path": "../core" },
|
||||
{ "path": "../../common/error" },
|
||||
{ "path": "../../common/graphql" },
|
||||
{ "path": "../routes" },
|
||||
{ "path": "../../common/infra" }
|
||||
{ "path": "../routes" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -19,14 +19,12 @@
|
||||
"@affine/nbstore": "workspace:*",
|
||||
"@affine/track": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@blocksuite/icons": "^2.2.17",
|
||||
"@capacitor/android": "^7.0.0",
|
||||
"@capacitor/app": "^7.0.0",
|
||||
"@capacitor/core": "^7.0.0",
|
||||
"@capacitor/keyboard": "^7.0.0",
|
||||
"@capacitor/status-bar": "^7.0.0",
|
||||
"@capgo/inappbrowser": "^8.0.0",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"async-call-rpc": "^6.4.2",
|
||||
"idb": "^8.0.0",
|
||||
@@ -39,7 +37,6 @@
|
||||
"@capacitor/cli": "^7.0.0",
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,23 +17,18 @@
|
||||
"@affine/track": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"@toeverything/theme": "^1.1.23",
|
||||
"@vanilla-extract/css": "^1.17.0",
|
||||
"async-call-rpc": "^6.4.2",
|
||||
"next-themes": "^0.4.4",
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1",
|
||||
"react-router-dom": "^6.30.3",
|
||||
"uuid": "^13.0.0",
|
||||
"webm-muxer": "^5.0.3"
|
||||
"uuid": "^13.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@affine-tools/utils": "workspace:*",
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
{ "path": "../../../common/nbstore" },
|
||||
{ "path": "../../track" },
|
||||
{ "path": "../../../../blocksuite/affine/all" },
|
||||
{ "path": "../../../common/infra" },
|
||||
{ "path": "../../../../tools/utils" }
|
||||
{ "path": "../../../common/infra" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -49,10 +49,8 @@
|
||||
"@reforged/maker-appimage": "^5.2.0",
|
||||
"@sentry/electron": "^7.9.0",
|
||||
"@sentry/esbuild-plugin": "^5.1.1",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"@types/set-cookie-parser": "^2.4.10",
|
||||
"@types/uuid": "^11.0.0",
|
||||
"@vitejs/plugin-react-swc": "^4.0.0",
|
||||
"app-builder-lib": "^26.8.1",
|
||||
"builder-util-runtime": "^9.5.1",
|
||||
@@ -80,7 +78,6 @@
|
||||
"async-call-rpc": "^6.4.2",
|
||||
"electron-updater": "^6.8.3",
|
||||
"link-preview-js": "^4.0.0",
|
||||
"next-themes": "^0.4.4",
|
||||
"set-cookie-parser": "^2.7.1",
|
||||
"yjs": "^13.6.27"
|
||||
},
|
||||
|
||||
@@ -23,14 +23,12 @@
|
||||
"@affine/nbstore": "workspace:*",
|
||||
"@affine/track": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@blocksuite/icons": "^2.2.17",
|
||||
"@capacitor/app": "^7.0.0",
|
||||
"@capacitor/browser": "^7.0.0",
|
||||
"@capacitor/core": "^7.0.0",
|
||||
"@capacitor/haptics": "^7.0.0",
|
||||
"@capacitor/ios": "^7.0.0",
|
||||
"@capacitor/keyboard": "^7.0.0",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:^",
|
||||
"async-call-rpc": "^6.4.2",
|
||||
"capacitor-plugin-app-tracking-transparency": "^2.0.5",
|
||||
@@ -38,17 +36,14 @@
|
||||
"next-themes": "^0.4.4",
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1",
|
||||
"react-router-dom": "^6.30.3",
|
||||
"yjs": "^13.6.27"
|
||||
"react-router-dom": "^6.30.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@affine-tools/cli": "workspace:*",
|
||||
"@affine-tools/utils": "workspace:*",
|
||||
"@affine/native": "workspace:*",
|
||||
"@capacitor/cli": "^7.0.0",
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
{ "path": "../../../../blocksuite/affine/all" },
|
||||
{ "path": "../../../common/infra" },
|
||||
{ "path": "../../../../tools/cli" },
|
||||
{ "path": "../../../../tools/utils" },
|
||||
{ "path": "../../native" }
|
||||
{ "path": "../../../../tools/utils" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -12,12 +12,9 @@
|
||||
"@affine/component": "workspace:*",
|
||||
"@affine/core": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/nbstore": "workspace:*",
|
||||
"@affine/track": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@blocksuite/icons": "^2.2.17",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1",
|
||||
@@ -26,7 +23,6 @@
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
{ "path": "../../component" },
|
||||
{ "path": "../../core" },
|
||||
{ "path": "../../../common/env" },
|
||||
{ "path": "../../i18n" },
|
||||
{ "path": "../../../common/nbstore" },
|
||||
{ "path": "../../track" },
|
||||
{ "path": "../../../../blocksuite/affine/all" },
|
||||
|
||||
@@ -12,11 +12,9 @@
|
||||
"@affine/component": "workspace:*",
|
||||
"@affine/core": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/nbstore": "workspace:*",
|
||||
"@affine/track": "workspace:*",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1",
|
||||
@@ -25,7 +23,6 @@
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
{ "path": "../../component" },
|
||||
{ "path": "../../core" },
|
||||
{ "path": "../../../common/env" },
|
||||
{ "path": "../../i18n" },
|
||||
{ "path": "../../../common/nbstore" },
|
||||
{ "path": "../../track" },
|
||||
{ "path": "../../../common/infra" }
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/electron-api": "workspace:*",
|
||||
"@affine/error": "workspace:*",
|
||||
"@affine/graphql": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
@@ -51,7 +50,6 @@
|
||||
"check-password-strength": "^3.0.0",
|
||||
"clsx": "^2.1.1",
|
||||
"dayjs": "^1.11.13",
|
||||
"emoji-mart": "^5.6.0",
|
||||
"emojibase-data": "^16.0.3",
|
||||
"foxact": "^0.2.49",
|
||||
"jotai": "^2.10.3",
|
||||
@@ -72,7 +70,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@affine-tools/utils": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@storybook/react": "^10.2.14",
|
||||
"@storybook/react-vite": "^10.2.14",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
|
||||
@@ -216,7 +216,7 @@ export const OnboardingPage = ({
|
||||
],
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
fetch('/api/worker/questionnaire', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(answer),
|
||||
|
||||
@@ -13,11 +13,9 @@
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../../common/debug" },
|
||||
{ "path": "../electron-api" },
|
||||
{ "path": "../../common/error" },
|
||||
{ "path": "../../common/graphql" },
|
||||
{ "path": "../i18n" },
|
||||
{ "path": "../../../tools/utils" },
|
||||
{ "path": "../../../blocksuite/affine/all" }
|
||||
{ "path": "../../../tools/utils" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -28,10 +28,8 @@
|
||||
"@blocksuite/std": "workspace:*",
|
||||
"@emotion/cache": "^11.14.0",
|
||||
"@emotion/css": "^11.13.5",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@floating-ui/dom": "^1.6.13",
|
||||
"@juggle/resize-observer": "^3.4.0",
|
||||
"@lit/context": "^1.1.4",
|
||||
"@lottiefiles/dotlottie-wc": "^0.9.4",
|
||||
"@marsidev/react-turnstile": "^1.1.0",
|
||||
"@myriaddreamin/typst-ts-renderer": "^0.7.0-rc2",
|
||||
@@ -39,7 +37,6 @@
|
||||
"@myriaddreamin/typst.ts": "^0.7.0-rc2",
|
||||
"@preact/signals-core": "^1.8.0",
|
||||
"@radix-ui/react-collapsible": "^1.1.2",
|
||||
"@radix-ui/react-context-menu": "^2.1.15",
|
||||
"@radix-ui/react-dialog": "^1.1.3",
|
||||
"@radix-ui/react-popover": "^1.1.3",
|
||||
"@radix-ui/react-scroll-area": "^1.2.2",
|
||||
@@ -51,7 +48,6 @@
|
||||
"@toeverything/pdf-viewer": "^0.1.1",
|
||||
"@toeverything/theme": "^1.1.23",
|
||||
"@vanilla-extract/dynamic": "^2.1.2",
|
||||
"@webcontainer/api": "^1.6.1",
|
||||
"animejs": "^4.0.0",
|
||||
"bytes": "^3.1.2",
|
||||
"clsx": "^2.1.1",
|
||||
@@ -68,13 +64,11 @@
|
||||
"graphql": "^16.9.0",
|
||||
"history": "^5.3.0",
|
||||
"idb": "^8.0.0",
|
||||
"idb-keyval": "^6.2.2",
|
||||
"image-blob-reduce": "^4.1.0",
|
||||
"is-svg": "^6.1.0",
|
||||
"jotai": "^2.10.3",
|
||||
"jotai-scope": "^0.7.2",
|
||||
"katex": "^0.16.27",
|
||||
"lib0": "^0.2.114",
|
||||
"lit": "^3.2.1",
|
||||
"lodash-es": "^4.17.23",
|
||||
"lottie-react": "^2.4.0",
|
||||
@@ -92,7 +86,6 @@
|
||||
"recharts": "^2.15.4",
|
||||
"rxjs": "^7.8.2",
|
||||
"semver": "^7.7.3",
|
||||
"ses": "^1.14.0",
|
||||
"shiki": "^3.19.0",
|
||||
"socket.io-client": "^4.8.3",
|
||||
"swr": "^2.3.7",
|
||||
@@ -105,7 +98,6 @@
|
||||
"@blocksuite/affine-ext-loader": "workspace:*",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/react": "^16.1.0",
|
||||
"@types/animejs": "^3.1.12",
|
||||
"@types/bytes": "^3.1.5",
|
||||
"@types/image-blob-reduce": "^4.1.4",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
@@ -113,7 +105,6 @@
|
||||
"@vanilla-extract/css": "^1.17.0",
|
||||
"fake-indexeddb": "^6.0.0",
|
||||
"happy-dom": "^20.3.0",
|
||||
"lodash-es": "^4.17.23",
|
||||
"vitest": "^4.0.18"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ export class CodeArtifactTool extends ArtifactTool<
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.code-artifact-preview > html-preview {
|
||||
.code-artifact-preview > affine-html-preview {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ export class CodeArtifactTool extends ArtifactTool<
|
||||
|
||||
return html`<div class="code-artifact-preview">
|
||||
${this.mode === 'preview'
|
||||
? html`<html-preview .html=${htmlContent}></html-preview>`
|
||||
? html`<affine-html-preview .html=${htmlContent}></affine-html-preview>`
|
||||
: html`<code-highlighter
|
||||
.std=${this.std}
|
||||
.code=${htmlContent}
|
||||
|
||||
@@ -304,11 +304,11 @@ export class PlaygroundContent extends SignalWatcher(
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
button.addEventListener('click', handleSendClick);
|
||||
|
||||
this._disposables.add(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
button.removeEventListener('click', handleSendClick);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||
// oxlint-disable-next-line no-restricted-imports
|
||||
import 'katex/dist/katex.min.css';
|
||||
|
||||
import { useConfirmModal, useLitPortalFactory } from '@affine/component';
|
||||
|
||||
@@ -50,10 +50,7 @@ export const usePageHelper = (docCollection: Workspace) => {
|
||||
|
||||
const createEdgelessAndOpen = useCallback(
|
||||
(
|
||||
options: {
|
||||
at?: 'new-tab' | 'tail' | 'active';
|
||||
show?: boolean;
|
||||
} = {
|
||||
options: { at?: 'new-tab' | 'tail' | 'active'; show?: boolean } = {
|
||||
at: 'active',
|
||||
show: true,
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { linkIframe } from './iframe-container';
|
||||
|
||||
export const CodeBlockHtmlPreview = CodeBlockPreviewExtension(
|
||||
'html',
|
||||
model => html`<html-preview .model=${model}></html-preview>`
|
||||
model => html`<affine-html-preview .model=${model}></affine-html-preview>`
|
||||
);
|
||||
|
||||
export class HTMLPreview extends SignalWatcher(
|
||||
@@ -153,11 +153,11 @@ export class HTMLPreview extends SignalWatcher(
|
||||
}
|
||||
|
||||
export function effects() {
|
||||
customElements.define('html-preview', HTMLPreview);
|
||||
customElements.define('affine-html-preview', HTMLPreview);
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'html-preview': HTMLPreview;
|
||||
'affine-html-preview': HTMLPreview;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ function renderOpenDocMenu(
|
||||
<affine-open-doc-dropdown-menu
|
||||
.actions=${actions}
|
||||
.context=${ctx}
|
||||
.openDocMode$=${openDocMode}
|
||||
.openDocModeSignal=${openDocMode}
|
||||
.updateOpenDocMode=${updateOpenDocMode}
|
||||
>
|
||||
</affine-open-doc-dropdown-menu>
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
LinkedMenuItem,
|
||||
LinkedWidgetConfig,
|
||||
} from '@blocksuite/affine/widgets/linked-doc';
|
||||
import { unsafeHTML } from '@blocksuite/affine-shared/utils';
|
||||
import { UserIcon } from '@blocksuite/icons/lit';
|
||||
import { BLOCK_ID_ATTR, type BlockComponent } from '@blocksuite/std';
|
||||
import { computed } from '@preact/signals-core';
|
||||
@@ -15,7 +16,6 @@ import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import Fuse, { type FuseResultMatch } from 'fuse.js';
|
||||
import { html } from 'lit';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
||||
|
||||
export const createCommentLinkedWidgetConfig = (
|
||||
framework: FrameworkProvider
|
||||
|
||||
@@ -130,7 +130,7 @@ export const EdgelessSnapshot = (props: Props) => {
|
||||
}, [docName, extensions, firstUpdate, updateElements]);
|
||||
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
renderEditor();
|
||||
return () => editorHostRef.current?.remove();
|
||||
}, [renderEditor]);
|
||||
|
||||
@@ -174,7 +174,7 @@ const McpServerSetting = () => {
|
||||
variant="primary"
|
||||
onClick={() => {
|
||||
if (!code) return;
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
navigator.clipboard.writeText(code);
|
||||
notify.success({
|
||||
title: t['Copied to clipboard'](),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||
// oxlint-disable-next-line no-restricted-imports
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import { MobileSignInPanel } from '../components/sign-in';
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
type LinkedWidgetConfig,
|
||||
LinkedWidgetUtils,
|
||||
} from '@blocksuite/affine/widgets/linked-doc';
|
||||
import { unsafeHTML } from '@blocksuite/affine-shared/utils';
|
||||
import {
|
||||
DateTimeIcon,
|
||||
NewXxxEdgelessIcon,
|
||||
@@ -35,7 +36,6 @@ import type { FuseResultMatch } from 'fuse.js';
|
||||
import Fuse from 'fuse.js';
|
||||
import { html } from 'lit';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
||||
import {
|
||||
createAbsolutePositionFromRelativePosition,
|
||||
createRelativePositionFromTypeIndex,
|
||||
|
||||
@@ -36,7 +36,7 @@ export { WorkspaceServerService } from './services/workspace-server';
|
||||
export { WorkspaceSubscriptionService } from './services/workspace-subscription';
|
||||
export type { ServerConfig } from './types';
|
||||
|
||||
// eslint-disable-next-line simple-import-sort/imports
|
||||
// oxlint-disable-next-line simple-import-sort/imports
|
||||
import { type Framework } from '@toeverything/infra';
|
||||
|
||||
import { GlobalCache, GlobalState } from '../storage/providers/global';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
/* oxlint-disable @typescript-eslint/no-non-null-assertion */
|
||||
import { apis, appInfo, events, sharedStorage } from '@affine/electron-api';
|
||||
import { Service } from '@toeverything/infra';
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ import type {
|
||||
LinkedMenuGroup,
|
||||
LinkedMenuItem,
|
||||
} from '@blocksuite/affine/widgets/linked-doc';
|
||||
import { unsafeHTML } from '@blocksuite/affine-shared/utils';
|
||||
import { CollectionsIcon, WarningIcon } from '@blocksuite/icons/lit';
|
||||
import { computed, signal } from '@preact/signals-core';
|
||||
import { Service } from '@toeverything/infra';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import Fuse, { type FuseResultMatch } from 'fuse.js';
|
||||
import { html } from 'lit';
|
||||
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
||||
import { catchError, map, of } from 'rxjs';
|
||||
|
||||
import { normalizeSearchText } from '../../../utils/normalize-search-text';
|
||||
|
||||
@@ -156,7 +156,7 @@ export class AsyncStorageMemento implements AsyncMemento {
|
||||
this.eventEmitter.on(key, eventEmitterCb);
|
||||
|
||||
// Listen for cross-tab events
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
const channelCb = (event: MessageEvent) => {
|
||||
if (event.data.key === key) {
|
||||
subscriber.next(event.data.value);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useLiveData } from '@toeverything/infra';
|
||||
import type { Location } from 'history';
|
||||
import { useEffect } from 'react';
|
||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||
// oxlint-disable-next-line no-restricted-imports
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
|
||||
import type { Workbench } from '../entities/workbench';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Location } from 'history';
|
||||
import { useEffect } from 'react';
|
||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||
// oxlint-disable-next-line no-restricted-imports
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import type { Workbench } from '../entities/workbench';
|
||||
|
||||
@@ -199,7 +199,7 @@ type Events<F> = {
|
||||
call: (arg: any) => void;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
// oxlint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
function createEvents<F extends Function>(): Events<F> {
|
||||
let handlers: F[] = [];
|
||||
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
".": "./src/index.ts",
|
||||
"./web-worker": "./src/web-worker.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"async-call-rpc": "^6.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@affine/electron": "workspace:*"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-misused-promises */
|
||||
/* oxlint-disable @typescript-eslint/no-misused-promises */
|
||||
import { createServer } from 'node:http';
|
||||
import path from 'node:path';
|
||||
|
||||
|
||||
@@ -727,7 +727,7 @@ export function SavedRecordingItem({
|
||||
const handlePlayPause = React.useCallback(() => {
|
||||
if (audioRef.current) {
|
||||
if (audioRef.current.paused) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
void audioRef.current.play();
|
||||
} else {
|
||||
audioRef.current.pause();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { DocStoragePool } from '../index';
|
||||
import test from 'ava';
|
||||
|
||||
import { DocStoragePool } from '../index';
|
||||
|
||||
test('can batch read/write pool', async t => {
|
||||
const pool = new DocStoragePool();
|
||||
await pool.connect('test', ':memory:');
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
"@affine-tools/cli": "workspace:*",
|
||||
"@affine-tools/utils": "workspace:*",
|
||||
"path-to-regexp": "^8.3.0",
|
||||
"query-string": "^9.1.1",
|
||||
"vitest": "^4.0.18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user