From ddbf7102e988e222cdbe88fe29784ef1cd772829 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Sat, 21 Jun 2025 12:52:25 +0800 Subject: [PATCH] chore: lock @biomejs/biome version (#54161) * chore: lock @biomejs/biome version * test: retry to commit * lock * lint: fix lint warning --------- Signed-off-by: lijianan <574980606@qq.com> --- .dumi/rehypeAntd.ts | 4 +++- .dumi/rehypeChangelog.ts | 10 +++++++--- components/date-picker/demo/external-panel.tsx | 5 ++++- package.json | 3 ++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.dumi/rehypeAntd.ts b/.dumi/rehypeAntd.ts index 0b9a5faa2b..abc514cf50 100644 --- a/.dumi/rehypeAntd.ts +++ b/.dumi/rehypeAntd.ts @@ -58,7 +58,9 @@ function rehypeAntd(): UnifiedTransformer { node.tagName === 'Table' && /^components/.test(filename) ) { - if (!node.properties) return; + if (!node.properties) { + return; + } node.properties.className ??= []; (node.properties.className as string[]).push('component-api-table'); } else if (node.type === 'element' && (node.tagName === 'Link' || node.tagName === 'a')) { diff --git a/.dumi/rehypeChangelog.ts b/.dumi/rehypeChangelog.ts index 0dce3d2ba0..b9e434c8d9 100644 --- a/.dumi/rehypeChangelog.ts +++ b/.dumi/rehypeChangelog.ts @@ -1,6 +1,7 @@ import type { UnifiedTransformer } from 'dumi'; import { unistUtilVisit } from 'dumi'; import set from 'lodash/set'; + let hastToString: typeof import('hast-util-to-string').toString; // workaround to import pure esm module @@ -15,14 +16,17 @@ function rehypeChangelog(): UnifiedTransformer { const { filename } = vFile.data.frontmatter as any; // 只处理 changelog 文件 - if (!/^changelog\.\S+\.md$/i.test(filename)) return; + if (!/^changelog\.\S+\.md$/i.test(filename)) { + return; + } const nodesToWrap: { parent: any; startIdx: number }[] = []; const WRAPPER_FLAG = 'data-changelog-wrapped'; // 包裹容器唯一标识 unistUtilVisit.visit(tree, 'element', (node, idx, parent) => { - if (node.properties?.[WRAPPER_FLAG]) return unistUtilVisit.SKIP; - + if (node.properties?.[WRAPPER_FLAG]) { + return unistUtilVisit.SKIP; + } if ( idx !== undefined && parent && diff --git a/components/date-picker/demo/external-panel.tsx b/components/date-picker/demo/external-panel.tsx index d464a7894c..b332e40cb0 100644 --- a/components/date-picker/demo/external-panel.tsx +++ b/components/date-picker/demo/external-panel.tsx @@ -91,7 +91,10 @@ const RangePickerDemo: React.FC = () => { const [visible, setVisible] = React.useState(false); const [panelVisible, setPanelVisible] = React.useState(false); - const [dates, setDates] = React.useState<[Dayjs, Dayjs] | null>([dayjs(), dayjs().add(1, 'day')]); + const [dates, setDates] = React.useState<[Dayjs, Dayjs] | null>(() => [ + dayjs(), + dayjs().add(1, 'day'), + ]); return (