Disable class-methods-use-this lint rule

This commit is contained in:
Evan Hahn 2021-11-04 16:04:51 -05:00 committed by GitHub
parent 569a14e897
commit d6ffb08a63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 8 additions and 80 deletions

View file

@ -45,6 +45,7 @@ const rules = {
'no-continue': 'off', 'no-continue': 'off',
'lines-between-class-members': 'off', 'lines-between-class-members': 'off',
'class-methods-use-this': 'off',
// Prettier overrides: // Prettier overrides:
'arrow-parens': 'off', 'arrow-parens': 'off',

View file

@ -313,7 +313,6 @@ export class ConversationController {
return conversation; return conversation;
} }
// eslint-disable-next-line class-methods-use-this
areWePrimaryDevice(): boolean { areWePrimaryDevice(): boolean {
const ourDeviceId = window.textsecure.storage.user.getDeviceId(); const ourDeviceId = window.textsecure.storage.user.getDeviceId();
@ -719,7 +718,6 @@ export class ConversationController {
* conversation the message belongs to OR null if a conversation isn't * conversation the message belongs to OR null if a conversation isn't
* found. * found.
*/ */
// eslint-disable-next-line class-methods-use-this
async getConversationForTargetMessage( async getConversationForTargetMessage(
targetFromId: string, targetFromId: string,
targetTimestamp: number targetTimestamp: number

View file

@ -2,7 +2,6 @@
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable max-classes-per-file */ /* eslint-disable max-classes-per-file */
/* eslint-disable class-methods-use-this */
import { isNumber } from 'lodash'; import { isNumber } from 'lodash';

View file

@ -1,8 +1,6 @@
// Copyright 2016-2021 Signal Messenger, LLC // Copyright 2016-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import PQueue from 'p-queue'; import PQueue from 'p-queue';
import { isNumber } from 'lodash'; import { isNumber } from 'lodash';
import { z } from 'zod'; import { z } from 'zod';

View file

@ -1,4 +1,4 @@
// Copyright 2018-2020 Signal Messenger, LLC // Copyright 2018-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import React from 'react'; import React from 'react';
@ -74,7 +74,6 @@ function getLabelForAddress(
} }
export class ContactDetail extends React.Component<Props> { export class ContactDetail extends React.Component<Props> {
// eslint-disable-next-line class-methods-use-this
public renderSendMessage({ public renderSendMessage({
hasSignalAccount, hasSignalAccount,
i18n, i18n,
@ -109,7 +108,6 @@ export class ContactDetail extends React.Component<Props> {
); );
} }
// eslint-disable-next-line class-methods-use-this
public renderEmail( public renderEmail(
items: Array<Email> | undefined, items: Array<Email> | undefined,
i18n: LocalizerType i18n: LocalizerType
@ -133,7 +131,6 @@ export class ContactDetail extends React.Component<Props> {
}); });
} }
// eslint-disable-next-line class-methods-use-this
public renderPhone( public renderPhone(
items: Array<Phone> | undefined, items: Array<Phone> | undefined,
i18n: LocalizerType i18n: LocalizerType
@ -157,7 +154,6 @@ export class ContactDetail extends React.Component<Props> {
}); });
} }
// eslint-disable-next-line class-methods-use-this
public renderAddressLine(value: string | undefined): JSX.Element | undefined { public renderAddressLine(value: string | undefined): JSX.Element | undefined {
if (!value) { if (!value) {
return undefined; return undefined;
@ -166,7 +162,6 @@ export class ContactDetail extends React.Component<Props> {
return <div>{value}</div>; return <div>{value}</div>;
} }
// eslint-disable-next-line class-methods-use-this
public renderPOBox( public renderPOBox(
poBox: string | undefined, poBox: string | undefined,
i18n: LocalizerType i18n: LocalizerType
@ -182,7 +177,6 @@ export class ContactDetail extends React.Component<Props> {
); );
} }
// eslint-disable-next-line class-methods-use-this
public renderAddressLineTwo(address: PostalAddress): JSX.Element | null { public renderAddressLineTwo(address: PostalAddress): JSX.Element | null {
if (address.city || address.region || address.postcode) { if (address.city || address.region || address.postcode) {
return ( return (

View file

@ -191,7 +191,6 @@ export class Quote extends React.Component<Props, State> {
); );
} }
// eslint-disable-next-line class-methods-use-this
public renderIcon(icon: string): JSX.Element { public renderIcon(icon: string): JSX.Element {
return ( return (
<div className="module-quote__icon-container"> <div className="module-quote__icon-container">

View file

@ -27,8 +27,6 @@ export type LeftPaneArchivePropsType =
| LeftPaneArchiveBasePropsType | LeftPaneArchiveBasePropsType
| (LeftPaneArchiveBasePropsType & LeftPaneSearchPropsType); | (LeftPaneArchiveBasePropsType & LeftPaneSearchPropsType);
/* eslint-disable class-methods-use-this */
export class LeftPaneArchiveHelper extends LeftPaneHelper<LeftPaneArchivePropsType> { export class LeftPaneArchiveHelper extends LeftPaneHelper<LeftPaneArchivePropsType> {
private readonly archivedConversations: ReadonlyArray<ConversationListItemPropsType>; private readonly archivedConversations: ReadonlyArray<ConversationListItemPropsType>;

View file

@ -32,8 +32,6 @@ export type LeftPaneChooseGroupMembersPropsType = {
selectedContacts: Array<ConversationType>; selectedContacts: Array<ConversationType>;
}; };
/* eslint-disable class-methods-use-this */
export class LeftPaneChooseGroupMembersHelper extends LeftPaneHelper<LeftPaneChooseGroupMembersPropsType> { export class LeftPaneChooseGroupMembersHelper extends LeftPaneHelper<LeftPaneChooseGroupMembersPropsType> {
private readonly candidateContacts: ReadonlyArray<ConversationType>; private readonly candidateContacts: ReadonlyArray<ConversationType>;

View file

@ -32,8 +32,6 @@ enum TopButton {
StartNewConversation, StartNewConversation,
} }
/* eslint-disable class-methods-use-this */
export class LeftPaneComposeHelper extends LeftPaneHelper<LeftPaneComposePropsType> { export class LeftPaneComposeHelper extends LeftPaneHelper<LeftPaneComposePropsType> {
private readonly composeContacts: ReadonlyArray<ContactListItemPropsType>; private readonly composeContacts: ReadonlyArray<ContactListItemPropsType>;

View file

@ -21,8 +21,6 @@ export type ToFindType = {
unreadOnly: boolean; unreadOnly: boolean;
}; };
/* eslint-disable class-methods-use-this */
export abstract class LeftPaneHelper<T> { export abstract class LeftPaneHelper<T> {
getHeaderContents( getHeaderContents(
_: Readonly<{ _: Readonly<{

View file

@ -23,8 +23,6 @@ export type LeftPaneInboxPropsType = {
startSearchCounter: number; startSearchCounter: number;
}; };
/* eslint-disable class-methods-use-this */
export class LeftPaneInboxHelper extends LeftPaneHelper<LeftPaneInboxPropsType> { export class LeftPaneInboxHelper extends LeftPaneHelper<LeftPaneInboxPropsType> {
private readonly conversations: ReadonlyArray<ConversationListItemPropsType>; private readonly conversations: ReadonlyArray<ConversationListItemPropsType>;

View file

@ -43,8 +43,6 @@ const searchResultKeys: Array<
'conversationResults' | 'contactResults' | 'messageResults' 'conversationResults' | 'contactResults' | 'messageResults'
> = ['conversationResults', 'contactResults', 'messageResults']; > = ['conversationResults', 'contactResults', 'messageResults'];
/* eslint-disable class-methods-use-this */
export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType> { export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType> {
private readonly conversationResults: MaybeLoadedSearchResultsType<ConversationListItemPropsType>; private readonly conversationResults: MaybeLoadedSearchResultsType<ConversationListItemPropsType>;
@ -144,7 +142,6 @@ export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType
} }
// This is currently unimplemented. See DESKTOP-1170. // This is currently unimplemented. See DESKTOP-1170.
// eslint-disable-next-line class-methods-use-this
getRowIndexToScrollTo( getRowIndexToScrollTo(
_selectedConversationId: undefined | string _selectedConversationId: undefined | string
): undefined | number { ): undefined | number {
@ -256,7 +253,6 @@ export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType
} }
// This is currently unimplemented. See DESKTOP-1170. // This is currently unimplemented. See DESKTOP-1170.
// eslint-disable-next-line class-methods-use-this
getConversationAndMessageAtIndex( getConversationAndMessageAtIndex(
_conversationIndex: number _conversationIndex: number
): undefined | { conversationId: string; messageId?: string } { ): undefined | { conversationId: string; messageId?: string } {
@ -264,7 +260,6 @@ export class LeftPaneSearchHelper extends LeftPaneHelper<LeftPaneSearchPropsType
} }
// This is currently unimplemented. See DESKTOP-1170. // This is currently unimplemented. See DESKTOP-1170.
// eslint-disable-next-line class-methods-use-this
getConversationAndMessageInDirection( getConversationAndMessageInDirection(
_toFind: Readonly<ToFindType>, _toFind: Readonly<ToFindType>,
_selectedConversationId: undefined | string, _selectedConversationId: undefined | string,

View file

@ -36,8 +36,6 @@ export type LeftPaneSetGroupMetadataPropsType = {
userAvatarData: ReadonlyArray<AvatarDataType>; userAvatarData: ReadonlyArray<AvatarDataType>;
}; };
/* eslint-disable class-methods-use-this */
export class LeftPaneSetGroupMetadataHelper extends LeftPaneHelper<LeftPaneSetGroupMetadataPropsType> { export class LeftPaneSetGroupMetadataHelper extends LeftPaneHelper<LeftPaneSetGroupMetadataPropsType> {
private readonly groupAvatar: undefined | Uint8Array; private readonly groupAvatar: undefined | Uint8Array;

View file

@ -1,8 +1,6 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import { Buffer } from 'buffer'; import { Buffer } from 'buffer';
export class Bytes { export class Bytes {

View file

@ -1,8 +1,6 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import { Buffer } from 'buffer'; import { Buffer } from 'buffer';
import type { Decipher } from 'crypto'; import type { Decipher } from 'crypto';
import crypto from 'crypto'; import crypto from 'crypto';

View file

@ -1,8 +1,6 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import type PQueue from 'p-queue'; import type PQueue from 'p-queue';
import type { LoggerType } from '../types/Logging'; import type { LoggerType } from '../types/Logging';
import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff'; import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff';

View file

@ -40,8 +40,6 @@ const reactionJobData = z.object({
export type ReactionJobData = z.infer<typeof reactionJobData>; export type ReactionJobData = z.infer<typeof reactionJobData>;
/* eslint-disable class-methods-use-this */
export class ReactionJobQueue extends JobQueue<ReactionJobData> { export class ReactionJobQueue extends JobQueue<ReactionJobData> {
private readonly inMemoryQueues = new InMemoryQueues(); private readonly inMemoryQueues = new InMemoryQueues();

View file

@ -1,8 +1,6 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import * as durations from '../util/durations'; import * as durations from '../util/durations';
import type { LoggerType } from '../types/Logging'; import type { LoggerType } from '../types/Logging';
import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff'; import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff';

View file

@ -1,6 +1,5 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import { z } from 'zod'; import { z } from 'zod';

View file

@ -1,6 +1,5 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import * as z from 'zod'; import * as z from 'zod';
import * as durations from '../util/durations'; import * as durations from '../util/durations';

View file

@ -1,8 +1,6 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import * as durations from '../util/durations'; import * as durations from '../util/durations';
import type { LoggerType } from '../types/Logging'; import type { LoggerType } from '../types/Logging';
import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff'; import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff';

View file

@ -1,8 +1,6 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import { z } from 'zod'; import { z } from 'zod';
import * as durations from '../util/durations'; import * as durations from '../util/durations';
import type { LoggerType } from '../types/Logging'; import type { LoggerType } from '../types/Logging';

View file

@ -1,7 +1,6 @@
// Copyright 2020-2021 Signal Messenger, LLC // Copyright 2020-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
/* eslint-disable camelcase */ /* eslint-disable camelcase */
import { compact, isNumber } from 'lodash'; import { compact, isNumber } from 'lodash';
import { batch as batchDispatch } from 'react-redux'; import { batch as batchDispatch } from 'react-redux';
@ -204,7 +203,6 @@ export class ConversationModel extends window.Backbone
private isInReduxBatch = false; private isInReduxBatch = false;
// eslint-disable-next-line class-methods-use-this
defaults(): Partial<ConversationAttributesType> { defaults(): Partial<ConversationAttributesType> {
return { return {
unreadCount: 0, unreadCount: 0,
@ -234,7 +232,6 @@ export class ConversationModel extends window.Backbone
return this.get('uuid') || this.get('e164'); return this.get('uuid') || this.get('e164');
} }
// eslint-disable-next-line class-methods-use-this
getContactCollection(): Backbone.Collection<ConversationModel> { getContactCollection(): Backbone.Collection<ConversationModel> {
const collection = new window.Backbone.Collection<ConversationModel>(); const collection = new window.Backbone.Collection<ConversationModel>();
const collator = new Intl.Collator(undefined, { sensitivity: 'base' }); const collator = new Intl.Collator(undefined, { sensitivity: 'base' });

View file

@ -760,7 +760,6 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
return `${account}.${device} ${timestamp}`; return `${account}.${device} ${timestamp}`;
} }
// eslint-disable-next-line class-methods-use-this
defaults(): Partial<MessageAttributesType> { defaults(): Partial<MessageAttributesType> {
return { return {
timestamp: new Date().getTime(), timestamp: new Date().getTime(),
@ -768,7 +767,6 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
}; };
} }
// eslint-disable-next-line class-methods-use-this
validate(attributes: Record<string, unknown>): void { validate(attributes: Record<string, unknown>): void {
const required = ['conversationId', 'received_at', 'sent_at']; const required = ['conversationId', 'received_at', 'sent_at'];
const missing = _.filter(required, attr => !attributes[attr]); const missing = _.filter(required, attr => !attributes[attr]);
@ -782,7 +780,6 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
this.set(attributes); this.set(attributes);
} }
// eslint-disable-next-line class-methods-use-this
getNameForNumber(number: string): string { getNameForNumber(number: string): string {
const conversation = window.ConversationController.get(number); const conversation = window.ConversationController.get(number);
if (!conversation) { if (!conversation) {
@ -1264,7 +1261,6 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
); );
} }
// eslint-disable-next-line class-methods-use-this
isReplayableError(e: Error): boolean { isReplayableError(e: Error): boolean {
return ( return (
e.name === 'MessageError' || e.name === 'MessageError' ||
@ -2071,7 +2067,6 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
}); });
} }
// eslint-disable-next-line class-methods-use-this
async copyFromQuotedMessage( async copyFromQuotedMessage(
quote: ProcessedQuote | undefined, quote: ProcessedQuote | undefined,
conversationId: string conversationId: string
@ -2145,7 +2140,6 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
return result; return result;
} }
// eslint-disable-next-line class-methods-use-this
async copyQuoteContentFromOriginal( async copyQuoteContentFromOriginal(
originalMessage: MessageModel, originalMessage: MessageModel,
quote: QuotedMessageType quote: QuotedMessageType

View file

@ -1,8 +1,6 @@
// Copyright 2020-2021 Signal Messenger, LLC // Copyright 2020-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable class-methods-use-this */
import { desktopCapturer, ipcRenderer } from 'electron'; import { desktopCapturer, ipcRenderer } from 'electron';
import type { import type {
AudioDevice, AudioDevice,

View file

@ -1,9 +1,7 @@
// Copyright 2015-2021 Signal Messenger, LLC // Copyright 2015-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable
class-methods-use-this, /* eslint-disable @typescript-eslint/no-empty-function */
@typescript-eslint/no-empty-function
*/
import { assert } from 'chai'; import { assert } from 'chai';
import { v4 as getGuid } from 'uuid'; import { v4 as getGuid } from 'uuid';

View file

@ -1,7 +1,7 @@
// Copyright 2015-2021 Signal Messenger, LLC // Copyright 2015-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable /* eslint-disable
class-methods-use-this,
no-new, no-new,
@typescript-eslint/no-empty-function, @typescript-eslint/no-empty-function,
@typescript-eslint/no-explicit-any @typescript-eslint/no-explicit-any

View file

@ -21,7 +21,6 @@ class FakeIPC extends EventEmitter implements MinimalIPC {
return this.state; return this.state;
} }
// eslint-disable-next-line class-methods-use-this
public send() { public send() {
throw new Error( throw new Error(
'This should not be called. It is only here to satisfy the interface' 'This should not be called. It is only here to satisfy the interface'

View file

@ -1,6 +1,7 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable max-classes-per-file, class-methods-use-this */
/* eslint-disable max-classes-per-file */
import { assert } from 'chai'; import { assert } from 'chai';
import * as sinon from 'sinon'; import * as sinon from 'sinon';

View file

@ -4,7 +4,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/ban-types */
/* eslint-disable more/no-then */ /* eslint-disable more/no-then */
/* eslint-disable class-methods-use-this */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import PQueue from 'p-queue'; import PQueue from 'p-queue';
import { omit } from 'lodash'; import { omit } from 'lodash';

View file

@ -2,7 +2,6 @@
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-bitwise */ /* eslint-disable no-bitwise */
/* eslint-disable class-methods-use-this */
/* eslint-disable camelcase */ /* eslint-disable camelcase */
import { isNumber, map } from 'lodash'; import { isNumber, map } from 'lodash';

View file

@ -2,7 +2,6 @@
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable guard-for-in */ /* eslint-disable guard-for-in */
/* eslint-disable class-methods-use-this */
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable more/no-then */ /* eslint-disable more/no-then */
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */

View file

@ -2,7 +2,6 @@
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-nested-ternary */ /* eslint-disable no-nested-ternary */
/* eslint-disable class-methods-use-this */
/* eslint-disable more/no-then */ /* eslint-disable more/no-then */
/* eslint-disable no-bitwise */ /* eslint-disable no-bitwise */
/* eslint-disable max-classes-per-file */ /* eslint-disable max-classes-per-file */

View file

@ -1,4 +1,4 @@
// Copyright 2020 Signal Messenger, LLC // Copyright 2020-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import PQueue from 'p-queue'; import PQueue from 'p-queue';
@ -12,7 +12,6 @@ const ringtoneEventQueue = new PQueue({
class CallingTones { class CallingTones {
private ringtone?: Sound; private ringtone?: Sound;
// eslint-disable-next-line class-methods-use-this
async playEndCall(): Promise<void> { async playEndCall(): Promise<void> {
const canPlayTone = window.Events.getCallRingtoneNotification(); const canPlayTone = window.Events.getCallRingtoneNotification();
if (!canPlayTone) { if (!canPlayTone) {
@ -55,7 +54,6 @@ class CallingTones {
}); });
} }
// eslint-disable-next-line class-methods-use-this
async someonePresenting() { async someonePresenting() {
const canPlayTone = window.Events.getCallRingtoneNotification(); const canPlayTone = window.Events.getCallRingtoneNotification();
if (!canPlayTone) { if (!canPlayTone) {

View file

@ -313,7 +313,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
this.updateAttachmentsView(); this.updateAttachmentsView();
} }
// eslint-disable-next-line class-methods-use-this
events(): Record<string, string> { events(): Record<string, string> {
return { return {
drop: 'onDrop', drop: 'onDrop',
@ -326,7 +325,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
// classname wouldn't be applied when Backbone creates our el. // classname wouldn't be applied when Backbone creates our el.
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // @ts-ignore
// eslint-disable-next-line class-methods-use-this
className(): string { className(): string {
return 'conversation'; return 'conversation';
} }
@ -334,7 +332,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
// Same situation as className(). // Same situation as className().
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // @ts-ignore
// eslint-disable-next-line class-methods-use-this
id(): string { id(): string {
return `conversation-${this.model.cid}`; return `conversation-${this.model.cid}`;
} }
@ -1005,7 +1002,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
}; };
} }
// eslint-disable-next-line class-methods-use-this
async cleanModels( async cleanModels(
collection: MessageModelCollectionType | Array<MessageModel> collection: MessageModelCollectionType | Array<MessageModel>
): Promise<Array<MessageModel>> { ): Promise<Array<MessageModel>> {
@ -2154,7 +2150,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
this.downloadAttachment({ attachment, timestamp, isDangerous }); this.downloadAttachment({ attachment, timestamp, isDangerous });
} }
// eslint-disable-next-line class-methods-use-this
async downloadAttachment({ async downloadAttachment({
attachment, attachment,
timestamp, timestamp,
@ -2753,7 +2748,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
this.listenBack(view); this.listenBack(view);
} }
// eslint-disable-next-line class-methods-use-this
async openConversation( async openConversation(
conversationId: string, conversationId: string,
messageId?: string messageId?: string
@ -2989,7 +2983,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
return true; return true;
} }
// eslint-disable-next-line class-methods-use-this
showSendAnywayDialog( showSendAnywayDialog(
contacts: Array<ConversationModel>, contacts: Array<ConversationModel>,
confirmText?: string confirmText?: string
@ -3427,7 +3420,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
window.reduxActions.linkPreviews.removeLinkPreview(); window.reduxActions.linkPreviews.removeLinkPreview();
} }
// eslint-disable-next-line class-methods-use-this
async getStickerPackPreview( async getStickerPackPreview(
url: string, url: string,
abortSignal: Readonly<AbortSignal> abortSignal: Readonly<AbortSignal>
@ -3529,7 +3521,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
} }
} }
// eslint-disable-next-line class-methods-use-this
async getGroupPreview( async getGroupPreview(
url: string, url: string,
abortSignal: Readonly<AbortSignal> abortSignal: Readonly<AbortSignal>