From 7d6f6a26d9d4daf048fee9ccd64b51a6f7a68550 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 8 Jul 2025 18:48:59 +0800 Subject: [PATCH 1/2] fix: biome schema --- biome.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biome.json b/biome.json index f007e4c7..2f4e4e0c 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.0.6/schema.json", + "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", "files": { "ignoreUnknown": true, "includes": [ From c255e70b80026a885c0e75d4a486014d01291263 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 8 Jul 2025 19:00:37 +0800 Subject: [PATCH 2/2] refactor: remove Fragment wrappers and simplify jest config --- jest.config.ts | 3 +- .../account/settings/components/binding.tsx | 30 ++++++++--------- .../settings/components/notification.tsx | 22 ++++++------- src/pages/profile/advanced/index.tsx | 32 ++++++++----------- 4 files changed, 39 insertions(+), 48 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 8fc87ad1..99051c41 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,7 +1,6 @@ -import type { Config } from '@jest/types'; import { configUmiAlias, createConfig } from '@umijs/max/test'; -export default async (): Promise => { +export default async (): Promise => { const config = await configUmiAlias({ ...createConfig({ target: 'browser', diff --git a/src/pages/account/settings/components/binding.tsx b/src/pages/account/settings/components/binding.tsx index 8ddfc7f3..4e2d1301 100644 --- a/src/pages/account/settings/components/binding.tsx +++ b/src/pages/account/settings/components/binding.tsx @@ -4,7 +4,7 @@ import { TaobaoOutlined, } from '@ant-design/icons'; import { List } from 'antd'; -import React, { Fragment } from 'react'; +import React from 'react'; const BindingView: React.FC = () => { const getData = () => [ @@ -29,21 +29,19 @@ const BindingView: React.FC = () => { ]; return ( - - ( - - - - )} - /> - + ( + + + + )} + /> ); }; diff --git a/src/pages/account/settings/components/notification.tsx b/src/pages/account/settings/components/notification.tsx index 628513e2..85d42d7f 100644 --- a/src/pages/account/settings/components/notification.tsx +++ b/src/pages/account/settings/components/notification.tsx @@ -1,5 +1,5 @@ import { List, Switch } from 'antd'; -import React, { Fragment } from 'react'; +import React from 'react'; type Unpacked = T extends (infer U)[] ? U : T; @@ -29,17 +29,15 @@ const NotificationView: React.FC = () => { const data = getData(); return ( - - > - itemLayout="horizontal" - dataSource={data} - renderItem={(item) => ( - - - - )} - /> - + > + itemLayout="horizontal" + dataSource={data} + renderItem={(item) => ( + + + + )} + /> ); }; diff --git a/src/pages/profile/advanced/index.tsx b/src/pages/profile/advanced/index.tsx index 092a1794..9aba9d1e 100644 --- a/src/pages/profile/advanced/index.tsx +++ b/src/pages/profile/advanced/index.tsx @@ -27,7 +27,7 @@ import { } from 'antd'; import classNames from 'classnames'; import type { FC } from 'react'; -import React, { Fragment, useState } from 'react'; +import React, { useState } from 'react'; import type { AdvancedProfileData } from './data.d'; import { queryAdvancedProfile } from './service'; import useStyles from './style.style'; @@ -187,28 +187,24 @@ const Advanced: FC = () => { ); const desc1 = (
- - 曲丽丽 - - + 曲丽丽 +
2016-12-12 12:32
); const desc2 = (
- - 周毛毛 - - + 周毛毛 +