Skip to content

Commit 2d343ca

Browse files
committed
Make linter happy
1 parent 81221c4 commit 2d343ca

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

components/SocialShare/SocialShare.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
IconTwitter,
2121
IconWhatsApp,
2222
} from '@/icons';
23-
import { SocialNetwork, ThemeSettings } from 'theme-settings';
23+
import { SocialNetwork, type ThemeSettings } from 'theme-settings';
2424

2525
import styles from './SocialShare.module.scss';
2626

modules/Story/Share/ButtonWithSuccessTooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Transition } from '@headlessui/react';
22
import { Fragment, useState } from 'react';
33

4-
import { Button, ButtonProps } from '@/components/Button';
4+
import { Button, type ButtonProps } from '@/components/Button';
55
import { IconCheck } from '@/icons';
66

77
import styles from './ButtonWithSuccessTooltip.module.scss';

modules/Story/Share/utils/copyStoryText.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ async function getArticleText(element: HTMLElement): Promise<string> {
4747
const clonedElement = element.cloneNode(true) as HTMLElement;
4848

4949
clonedElement.querySelectorAll('table').forEach((node) => {
50+
// eslint-disable-next-line no-param-reassign
5051
node.textContent = htmlTableToPlainText(node);
5152
});
5253

@@ -102,22 +103,22 @@ function htmlTableToPlainText(tableElement: HTMLTableElement): string {
102103
const rowLength =
103104
columnWidths.reduce((sum, columnWidth) => sum + columnWidth) +
104105
columnSeparator.length * (columnWidths.length - 1);
105-
const separator = `\n${'─'.repeat(rowLength)}\n`;
106+
const rowSeparator = `\n${'─'.repeat(rowLength)}\n`;
106107

107108
return rowsLines
108109
.flatMap((row) => {
109110
const rowHeight = Math.max(...row.map((text) => text.split('\n').length));
110111

111-
return Array.from({ length: rowHeight }, (_, lineIndex) => {
112-
return row
112+
return Array.from({ length: rowHeight }, (_, lineIndex) =>
113+
row
113114
.map((cell, columnIndex) => {
114115
const lineText = cell.split('\n')[lineIndex] ?? '';
115116
return lineText.padEnd(columnWidths[columnIndex], '\xa0'); // &nbsp;
116117
})
117-
.join(columnSeparator);
118-
}).join('\n');
118+
.join(columnSeparator),
119+
).join('\n');
119120
})
120-
.join(separator);
121+
.join(rowSeparator);
121122
}
122123

123124
function wrapText(text: string, maxLineLength: number): string {

0 commit comments

Comments
 (0)