Skip to content

Commit ddc1032

Browse files
ESLint fixes
1 parent 7adaf85 commit ddc1032

File tree

83 files changed

+94
-161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+94
-161
lines changed

e2e/fixtures/data/attachment.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable sort-keys */
21
const smallImageAttachment = [
32
{
43
type: 'image',

src/components/Attachment/Attachment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ export const Attachment = <
9393
) => {
9494
const { attachments } = props;
9595

96-
// eslint-disable-next-line react-hooks/exhaustive-deps
9796
const groupedAttachments = useMemo(
9897
() => renderGroupedAttachments(props),
98+
// eslint-disable-next-line react-hooks/exhaustive-deps
9999
[attachments],
100100
);
101101

src/components/Attachment/AttachmentContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ export const VoiceRecordingContainer = <
251251
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
252252
>({
253253
attachment,
254-
VoiceRecording = DefaultVoiceRecording,
255254
isQuoted,
255+
VoiceRecording = DefaultVoiceRecording,
256256
}: RenderAttachmentProps<StreamChatGenerics>) => (
257257
<AttachmentWithinContainer attachment={attachment} componentType='voiceRecording'>
258258
<div className='str-chat__attachment'>

src/components/Attachment/__tests__/Attachment.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ describe('attachment', () => {
218218
],
219219
});
220220
await waitFor(() => {
221-
/* eslint-disable jest-dom/prefer-in-document */
222221
const Card = queryAllByTestId('card-attachment');
223222

224223
expect(Card).toHaveLength(3);

src/components/Attachment/__tests__/AttachmentActions.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ describe('AttachmentActions', () => {
5151
fireEvent.click(getByTestId(actions[1].name));
5252

5353
await waitFor(() => {
54-
// eslint-disable-next-line jest/prefer-called-with
5554
expect(actionHandler).toHaveBeenCalledTimes(2);
5655
});
5756
});

src/components/AutoCompleteTextarea/Textarea.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,6 @@ export class ReactTextareaAutocomplete extends React.Component {
455455
'value',
456456
];
457457

458-
// eslint-disable-next-line
459458
for (const prop in props) {
460459
if (notSafe.includes(prop)) delete props[prop];
461460
}

src/components/AutoCompleteTextarea/utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export function defaultScrollToItem(container, item) {
2020
return;
2121
}
2222

23-
// eslint-disable-next-line
2423
container.scrollTop = itemOffsetTop;
2524
}
2625

src/components/Avatar/__tests__/Avatar.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const AVATAR_ROOT_TEST_ID = 'avatar';
99
const AVATAR_FALLBACK_TEST_ID = 'avatar-fallback';
1010
const AVATAR_IMG_TEST_ID = 'avatar-img';
1111

12-
afterEach(cleanup); // eslint-disable-line
12+
afterEach(cleanup);
1313

1414
describe('Avatar', () => {
1515
it('should render component with default props', () => {

src/components/Channel/hooks/useCreateChannelStateContext.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ export const useCreateChannelStateContext = <
1919
channel,
2020
channelCapabilitiesArray = [],
2121
channelConfig,
22+
channelUnreadUiState,
2223
debounceURLEnrichmentMs,
2324
dragAndDropWindow,
2425
enrichURLForPreview,
25-
giphyVersion,
2626
error,
2727
findURLFn,
28+
giphyVersion,
2829
hasMore,
2930
hasMoreNewer,
30-
imageAttachmentSizeHandler,
31-
suppressAutoscroll,
3231
highlightedMessageId,
32+
imageAttachmentSizeHandler,
3333
loading,
3434
loadingMore,
3535
maxNumberOfFiles,
@@ -44,14 +44,14 @@ export const useCreateChannelStateContext = <
4444
read = {},
4545
shouldGenerateVideoThumbnail,
4646
skipMessageDataMemoization,
47+
suppressAutoscroll,
4748
thread,
4849
threadHasMore,
4950
threadLoadingMore,
5051
threadMessages = [],
51-
channelUnreadUiState,
5252
videoAttachmentSizeHandler,
53-
watcherCount,
5453
watcher_count,
54+
watcherCount,
5555
watchers,
5656
} = value;
5757

src/components/ChannelHeader/ChannelHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export const ChannelHeader = <
3434
) => {
3535
const {
3636
Avatar = DefaultAvatar,
37-
MenuIcon = DefaultMenuIcon,
3837
image: overrideImage,
3938
live,
39+
MenuIcon = DefaultMenuIcon,
4040
title: overrideTitle,
4141
} = props;
4242

0 commit comments

Comments
 (0)