From a2e04d56248fcb92f2f6286a714693f2e8bdf77a Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 23 Dec 2024 16:01:56 +0800 Subject: [PATCH] style: fix lint --- packages/g6/__tests__/demos/index.ts | 2 +- packages/g6/__tests__/demos/plugin-tooltip-async.ts | 6 ++---- packages/g6/__tests__/unit/plugins/tooltip.spec.ts | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/g6/__tests__/demos/index.ts b/packages/g6/__tests__/demos/index.ts index 12f3e598835..b2ebb9193ce 100644 --- a/packages/g6/__tests__/demos/index.ts +++ b/packages/g6/__tests__/demos/index.ts @@ -141,9 +141,9 @@ export { pluginTimebar } from './plugin-timebar'; export { pluginToolbarBuildIn } from './plugin-toolbar-build-in'; export { pluginToolbarIconfont } from './plugin-toolbar-iconfont'; export { pluginTooltip } from './plugin-tooltip'; +export { pluginTooltipAsync } from './plugin-tooltip-async'; export { pluginTooltipDual } from './plugin-tooltip-dual'; export { pluginTooltipEnable } from './plugin-tooltip-enable'; -export { pluginTooltipAsync } from './plugin-tooltip-async'; export { pluginWatermark } from './plugin-watermark'; export { pluginWatermarkImage } from './plugin-watermark-image'; export { theme } from './theme'; diff --git a/packages/g6/__tests__/demos/plugin-tooltip-async.ts b/packages/g6/__tests__/demos/plugin-tooltip-async.ts index 8e7605e8345..88bbff65d4e 100644 --- a/packages/g6/__tests__/demos/plugin-tooltip-async.ts +++ b/packages/g6/__tests__/demos/plugin-tooltip-async.ts @@ -5,9 +5,7 @@ export const pluginTooltipAsync: TestCase = async (context) => { const graph = new Graph({ ...context, data: { - nodes: [ - { id: 'node1', style: { x: 150, y: 100 }, data: { desc: 'get content async test' } }, - ], + nodes: [{ id: 'node1', style: { x: 150, y: 100 }, data: { desc: 'get content async test' } }], }, node: { style: { @@ -22,7 +20,7 @@ export const pluginTooltipAsync: TestCase = async (context) => { getContent: (evt: IElementEvent, items: ElementDatum[]) => { return new Promise((resolve) => { resolve(items[0].data?.desc || ''); - }) + }); }, }, ], diff --git a/packages/g6/__tests__/unit/plugins/tooltip.spec.ts b/packages/g6/__tests__/unit/plugins/tooltip.spec.ts index 257bb851c92..5a6828b5a7f 100644 --- a/packages/g6/__tests__/unit/plugins/tooltip.spec.ts +++ b/packages/g6/__tests__/unit/plugins/tooltip.spec.ts @@ -1,6 +1,6 @@ import type { Tooltip } from '@/src'; import { ComboEvent, EdgeEvent, NodeEvent, idOf } from '@/src'; -import { pluginTooltip, pluginTooltipEnable, pluginTooltipAsync } from '@@/demos'; +import { pluginTooltip, pluginTooltipAsync, pluginTooltipEnable } from '@@/demos'; import { createDemoGraph } from '@@/utils'; describe('plugin tooltip', () => {