From 020176f2b5fc4383ac9c3fd1685d73de354f2cb2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=F0=9D=91=BE=F0=9D=92=96=F0=9D=92=99=F0=9D=92=89?=
Date: Thu, 12 Dec 2024 10:22:30 +0800
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20chore:=20format=20code=20(?=
=?UTF-8?q?use=20`npm=20run=20format`)=20(#51978)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* chore: update formatter rule
* ♻️ chore: format code (use `npm run format`)
---
biome.json | 5 +++++
components/divider/__tests__/index.test.tsx | 12 ++----------
components/divider/demo/variant.tsx | 10 +++++++---
components/float-button/__tests__/group.test.tsx | 2 +-
components/input/OTP/index.tsx | 2 +-
components/list/Item.tsx | 2 +-
components/locale/ru_RU.ts | 4 ++--
components/locale/uz_UZ.ts | 4 ++--
webpack.config.js | 6 +++---
9 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/biome.json b/biome.json
index e01856c438..c68a269df1 100644
--- a/biome.json
+++ b/biome.json
@@ -65,6 +65,11 @@
}
}
},
+ "css": {
+ "formatter": {
+ "quoteStyle": "single"
+ }
+ },
"overrides": [
{
"include": ["**/*.test.ts", "**/*.test.tsx", "tests/**/*", "scripts/**/*", ".dumi/**/*"],
diff --git a/components/divider/__tests__/index.test.tsx b/components/divider/__tests__/index.test.tsx
index e529ae70b2..c827633829 100644
--- a/components/divider/__tests__/index.test.tsx
+++ b/components/divider/__tests__/index.test.tsx
@@ -28,22 +28,14 @@ describe('Divider', () => {
});
it('support bool dashed', () => {
- const { container } = render(
-
- test test test
- ,
- );
+ const { container } = render(test test test);
expect(container?.querySelector('.ant-divider-dashed')).toHaveStyle({
borderStyle: 'dashed',
});
});
it('support string variant', () => {
- const { container } = render(
-
- test dotted
- ,
- );
+ const { container } = render(test dotted);
expect(container?.querySelector('.ant-divider-dotted')).toHaveStyle({
borderStyle: 'dotted',
});
diff --git a/components/divider/demo/variant.tsx b/components/divider/demo/variant.tsx
index 7f2a9c033e..aba5a6d769 100644
--- a/components/divider/demo/variant.tsx
+++ b/components/divider/demo/variant.tsx
@@ -7,17 +7,21 @@ const App: React.FC = () => (
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
- Solid
+ Solid
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
- Dotted
+
+ Dotted
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
- Dashed
+
+ Dashed
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
diff --git a/components/float-button/__tests__/group.test.tsx b/components/float-button/__tests__/group.test.tsx
index 93af2f0ff4..67c215ae3c 100644
--- a/components/float-button/__tests__/group.test.tsx
+++ b/components/float-button/__tests__/group.test.tsx
@@ -116,7 +116,7 @@ describe('FloatButtonGroup', () => {
fireEvent.click(container.querySelector('.ant-float-btn-group')!);
expect(onClick).toHaveBeenCalled();
expect(onClick2).not.toHaveBeenCalled();
- });
+ });
it('warning if set `open` but not set `trigger`', () => {
const warnSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
diff --git a/components/input/OTP/index.tsx b/components/input/OTP/index.tsx
index 7c10017778..dcbc54c7d5 100644
--- a/components/input/OTP/index.tsx
+++ b/components/input/OTP/index.tsx
@@ -208,7 +208,7 @@ const OTP = React.forwardRef((props, ref) => {
const nextCells = patchValue(index, txt);
const nextIndex = Math.min(index + txt.length, length - 1);
- if (nextIndex !== index && nextCells[index] !== undefined) {
+ if (nextIndex !== index && nextCells[index] !== undefined) {
refs.current[nextIndex]?.focus();
}
diff --git a/components/list/Item.tsx b/components/list/Item.tsx
index e3cabc368f..1860b5c73a 100644
--- a/components/list/Item.tsx
+++ b/components/list/Item.tsx
@@ -107,7 +107,7 @@ const InternalItem = React.forwardRef((props, ref
};
const prefixCls = getPrefixCls('list', customizePrefixCls);
- const actionsContent = (actions && actions.length > 0) && (
+ const actionsContent = actions && actions.length > 0 && (