From d1a0fb862e3a2c2a58fc241537ba9d637c389e5e Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 15 Aug 2024 21:51:41 +0700 Subject: [PATCH] chore: reduce typo count (#50439) --- .../__tests__/__snapshots__/demo-extend.test.ts.snap | 4 ++-- .../alert/__tests__/__snapshots__/demo.test.ts.snap | 4 ++-- components/alert/demo/component-token.tsx | 2 +- components/alert/demo/custom-icon.tsx | 4 ++-- components/progress/index.en-US.md | 2 +- components/table/__tests__/Table.sorter.test.tsx | 11 ++++++----- .../__snapshots__/Table.sorter.test.tsx.snap | 6 +++--- components/typography/demo/ellipsis.md | 2 +- components/watermark/utils.ts | 2 +- 9 files changed, 19 insertions(+), 18 deletions(-) diff --git a/components/alert/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/alert/__tests__/__snapshots__/demo-extend.test.ts.snap index 98dfcdce2f..f731445f17 100644 --- a/components/alert/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/alert/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -787,7 +787,7 @@ Array [
- Detailed description and advices about successful copywriting. + Detailed description and advice about successful copywriting.
, @@ -827,7 +827,7 @@ Array [
- Additional description and informations about copywriting. + Additional description and information about copywriting.
, diff --git a/components/alert/__tests__/__snapshots__/demo.test.ts.snap b/components/alert/__tests__/__snapshots__/demo.test.ts.snap index ef163fe1dd..7d8edd3e61 100644 --- a/components/alert/__tests__/__snapshots__/demo.test.ts.snap +++ b/components/alert/__tests__/__snapshots__/demo.test.ts.snap @@ -775,7 +775,7 @@ Array [
- Detailed description and advices about successful copywriting. + Detailed description and advice about successful copywriting.
, @@ -815,7 +815,7 @@ Array [
- Additional description and informations about copywriting. + Additional description and information about copywriting.
, diff --git a/components/alert/demo/component-token.tsx b/components/alert/demo/component-token.tsx index 00f1d7f1c3..2a655b15e6 100644 --- a/components/alert/demo/component-token.tsx +++ b/components/alert/demo/component-token.tsx @@ -18,7 +18,7 @@ const App: React.FC = () => ( diff --git a/components/alert/demo/custom-icon.tsx b/components/alert/demo/custom-icon.tsx index c6967e2069..415fc064fd 100644 --- a/components/alert/demo/custom-icon.tsx +++ b/components/alert/demo/custom-icon.tsx @@ -19,7 +19,7 @@ const App: React.FC = () => ( @@ -27,7 +27,7 @@ const App: React.FC = () => ( diff --git a/components/progress/index.en-US.md b/components/progress/index.en-US.md index 16c5e6c5ef..30b107c3be 100644 --- a/components/progress/index.en-US.md +++ b/components/progress/index.en-US.md @@ -31,7 +31,7 @@ If it will take a long time to complete an operation, you can use `Progress` to Stroke Linecap Custom line gradient Progress bar with steps -Circular progress bar whit steps +Circular progress bar with steps Progress size Change progress value position diff --git a/components/table/__tests__/Table.sorter.test.tsx b/components/table/__tests__/Table.sorter.test.tsx index bca1c2c9a9..81b3a51f98 100644 --- a/components/table/__tests__/Table.sorter.test.tsx +++ b/components/table/__tests__/Table.sorter.test.tsx @@ -89,16 +89,17 @@ describe('Table.sorter', () => { { title: 'Amount', dataIndex: 'estimatedTicketsLeft', - sorter: (a:any, b:any) => a.estimatedTicketsLeft - b.estimatedTicketsLeft, + sorter: (a: any, b: any) => a.estimatedTicketsLeft - b.estimatedTicketsLeft, sortDirections: ['descend', 'ascend'], - render: (text:any) => `${text} left`, + render: (text: any) => `${text} left`, }, { title: '[%]', dataIndex: 'estimatedTicketsLeftPercentage', - sorter: (a:any, b:any) => a.estimatedTicketsLeftPercentage - b.estimatedTicketsLeftPercentage, + sorter: (a: any, b: any) => + a.estimatedTicketsLeftPercentage - b.estimatedTicketsLeftPercentage, sortDirections: ['descend', 'ascend'], - render: (text:any) => `${text.toFixed(2)}%`, + render: (text: any) => `${text.toFixed(2)}%`, }, ], }, @@ -512,7 +513,7 @@ describe('Table.sorter', () => { expect(container.querySelector('.ant-tooltip-open')).toBeFalsy(); }); - it('renders custome sort icon correctly', () => { + it('renders custom sort icon correctly', () => { const sortIcon = ({ sortOrder }: { sortOrder?: SortOrder }): React.ReactNode => { let text: string; if (sortOrder === undefined) { diff --git a/components/table/__tests__/__snapshots__/Table.sorter.test.tsx.snap b/components/table/__tests__/__snapshots__/Table.sorter.test.tsx.snap index 0a520e33a2..bcfd93b30e 100644 --- a/components/table/__tests__/__snapshots__/Table.sorter.test.tsx.snap +++ b/components/table/__tests__/__snapshots__/Table.sorter.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Table.sorter renders custome sort icon correctly 1`] = ` +exports[`Table.sorter renders custom sort icon correctly 1`] = ` @@ -8,7 +8,7 @@ exports[`Table.sorter renders custome sort icon correctly 1`] = ` `; -exports[`Table.sorter renders custome sort icon correctly 2`] = ` +exports[`Table.sorter renders custom sort icon correctly 2`] = ` @@ -16,7 +16,7 @@ exports[`Table.sorter renders custome sort icon correctly 2`] = ` `; -exports[`Table.sorter renders custome sort icon correctly 3`] = ` +exports[`Table.sorter renders custom sort icon correctly 3`] = ` diff --git a/components/typography/demo/ellipsis.md b/components/typography/demo/ellipsis.md index fd14cfce5b..4ac877642d 100644 --- a/components/typography/demo/ellipsis.md +++ b/components/typography/demo/ellipsis.md @@ -4,4 +4,4 @@ ## en-US -Multiple line ellipsis support. You can use `tooltip` to configure ellipsis tooltip. The `expandable` property is recommened when you have lots of content. +Multiple line ellipsis support. You can use `tooltip` to configure ellipsis tooltip. The `expandable` property is recommended when you have lots of content. diff --git a/components/watermark/utils.ts b/components/watermark/utils.ts index 523af737b3..7f61cd9112 100644 --- a/components/watermark/utils.ts +++ b/components/watermark/utils.ts @@ -1,4 +1,4 @@ -/** converting camel-cased strings to be lowercase and link it with Separato */ +/** converting camel-cased strings to be lowercase and link it with Separator */ export function toLowercaseSeparator(key: string) { return key.replace(/([A-Z])/g, '-$1').toLowerCase(); }