Remove unused eslint-disables

This commit is contained in:
Evan Hahn 2022-06-03 21:07:51 +00:00 committed by GitHub
parent 63189f3f91
commit f50a6abe36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 68 additions and 142 deletions

View file

@ -217,4 +217,6 @@ module.exports = {
], ],
rules, rules,
reportUnusedDisableDirectives: true,
}; };

View file

@ -165,10 +165,6 @@ function showWindow() {
} }
} }
// This code runs before the 'ready' event fires, so we don't have our logging
// infrastructure in place yet. So we use console.log directly.
/* eslint-disable no-console */
if (!process.mas) { if (!process.mas) {
console.log('making app single instance'); console.log('making app single instance');
const gotLock = app.requestSingleInstanceLock(); const gotLock = app.requestSingleInstanceLock();
@ -1614,7 +1610,6 @@ app.on('ready', async () => {
return; return;
} }
// eslint-disable-next-line more/no-then
appStartInitialSpellcheckSetting = await getSpellCheckSetting(); appStartInitialSpellcheckSetting = await getSpellCheckSetting();
try { try {

View file

@ -1,8 +1,6 @@
// Copyright 2020-2021 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable strict */
import type { BrowserWindow } from 'electron'; import type { BrowserWindow } from 'electron';
import { Menu, clipboard, nativeImage } from 'electron'; import { Menu, clipboard, nativeImage } from 'electron';
import { uniq } from 'lodash'; import { uniq } from 'lodash';

View file

@ -3,7 +3,7 @@
/* global Whisper, window */ /* global Whisper, window */
/* eslint-disable global-require, no-inner-declarations */ /* eslint-disable global-require */
const preloadStartTime = Date.now(); const preloadStartTime = Date.now();
let preloadEndTime = 0; let preloadEndTime = 0;

View file

@ -1,18 +1,16 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* global window */ /* global window */
const { ipcRenderer } = require('electron'); const { ipcRenderer } = require('electron');
const fastGlob = require('fast-glob');
window.assert = require('chai').assert; window.assert = require('chai').assert;
// This is a hack to let us run TypeScript tests in the renderer process. See the // This is a hack to let us run TypeScript tests in the renderer process. See the
// code in `test/index.html`. // code in `test/index.html`.
/* eslint-disable global-require, import/no-extraneous-dependencies */
const fastGlob = require('fast-glob');
window.test = { window.test = {
onComplete(info) { onComplete(info) {
return ipcRenderer.invoke('ci:test-electron:done', info); return ipcRenderer.invoke('ci:test-electron:done', info);

View file

@ -1,4 +1,4 @@
// Copyright 2019-2021 Signal Messenger, LLC // Copyright 2019-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
@ -12,7 +12,6 @@ import { clamp, find, isNumber, pull, remove, take, uniq } from 'lodash';
import type { SortEnd } from 'react-sortable-hoc'; import type { SortEnd } from 'react-sortable-hoc';
import { bindActionCreators } from 'redux'; import { bindActionCreators } from 'redux';
import arrayMove from 'array-move'; import arrayMove from 'array-move';
// eslint-disable-next-line import/no-cycle
import type { AppState } from '../reducer'; import type { AppState } from '../reducer';
import type { import type {
PackMetaData, PackMetaData,

View file

@ -1,9 +1,8 @@
// Copyright 2019-2020 Signal Messenger, LLC // Copyright 2019-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import type { Reducer } from 'redux'; import type { Reducer } from 'redux';
import { combineReducers } from 'redux'; import { combineReducers } from 'redux';
// eslint-disable-next-line import/no-cycle
import { reducer as stickers } from './ducks/stickers'; import { reducer as stickers } from './ducks/stickers';
export const reducer = combineReducers({ export const reducer = combineReducers({

View file

@ -271,7 +271,6 @@ export async function startApp(): Promise<void> {
serverTrustRoot: window.getServerTrustRoot(), serverTrustRoot: window.getServerTrustRoot(),
}); });
// eslint-disable-next-line no-inner-declarations
function queuedEventListener<Args extends Array<unknown>>( function queuedEventListener<Args extends Array<unknown>>(
handler: (...args: Args) => Promise<void> | void, handler: (...args: Args) => Promise<void> | void,
track = true track = true

View file

@ -244,7 +244,6 @@ export function CompositionInput(props: Props): React.ReactElement {
}; };
if (inputApi) { if (inputApi) {
// eslint-disable-next-line no-param-reassign
inputApi.current = { inputApi.current = {
focus, focus,
insertEmoji, insertEmoji,

View file

@ -393,56 +393,46 @@ export const ForwardMessageModal: FunctionComponent<PropsType> = ({
/> />
{candidateConversations.length ? ( {candidateConversations.length ? (
<Measure bounds> <Measure bounds>
{({ contentRect, measureRef }: MeasuredComponentProps) => { {({ contentRect, measureRef }: MeasuredComponentProps) => (
// We disable this ESLint rule because we're capturing a bubbled <div
// keydown event. See [this note in the jsx-a11y docs][0]. className="module-ForwardMessageModal__list-wrapper"
// ref={measureRef}
// [0]: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/c275964f52c35775208bd00cb612c6f82e42e34f/docs/rules/no-static-element-interactions.md#case-the-event-handler-is-only-being-used-to-capture-bubbled-events >
/* eslint-disable jsx-a11y/no-static-element-interactions */ <ConversationList
return ( dimensions={contentRect.bounds}
<div getPreferredBadge={getPreferredBadge}
className="module-ForwardMessageModal__list-wrapper" getRow={getRow}
ref={measureRef} i18n={i18n}
> onClickArchiveButton={shouldNeverBeCalled}
<ConversationList onClickContactCheckbox={(
dimensions={contentRect.bounds} conversationId: string,
getPreferredBadge={getPreferredBadge} disabledReason:
getRow={getRow} | undefined
i18n={i18n} | ContactCheckboxDisabledReason
onClickArchiveButton={shouldNeverBeCalled} ) => {
onClickContactCheckbox={( if (
conversationId: string, disabledReason !==
disabledReason: ContactCheckboxDisabledReason.MaximumContactsSelected
| undefined ) {
| ContactCheckboxDisabledReason toggleSelectedConversation(conversationId);
) => {
if (
disabledReason !==
ContactCheckboxDisabledReason.MaximumContactsSelected
) {
toggleSelectedConversation(conversationId);
}
}}
lookupConversationWithoutUuid={
asyncShouldNeverBeCalled
} }
showConversation={shouldNeverBeCalled} }}
showUserNotFoundModal={shouldNeverBeCalled} lookupConversationWithoutUuid={asyncShouldNeverBeCalled}
setIsFetchingUUID={shouldNeverBeCalled} showConversation={shouldNeverBeCalled}
onSelectConversation={shouldNeverBeCalled} showUserNotFoundModal={shouldNeverBeCalled}
renderMessageSearchResult={() => { setIsFetchingUUID={shouldNeverBeCalled}
shouldNeverBeCalled(); onSelectConversation={shouldNeverBeCalled}
return <div />; renderMessageSearchResult={() => {
}} shouldNeverBeCalled();
rowCount={rowCount} return <div />;
shouldRecomputeRowHeights={false} }}
showChooseGroupMembers={shouldNeverBeCalled} rowCount={rowCount}
theme={theme} shouldRecomputeRowHeights={false}
/> showChooseGroupMembers={shouldNeverBeCalled}
</div> theme={theme}
); />
/* eslint-enable jsx-a11y/no-static-element-interactions */ </div>
}} )}
</Measure> </Measure>
) : ( ) : (
<div className="module-ForwardMessageModal__no-candidate-contacts"> <div className="module-ForwardMessageModal__no-candidate-contacts">

View file

@ -213,9 +213,6 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
let avatarSize: number; let avatarSize: number;
// TypeScript isn't smart enough to know that `isInPip` by itself disambiguates the
// types, so we have to use `props.isInPip` instead.
// eslint-disable-next-line react/destructuring-assignment
if (props.isInPip) { if (props.isInPip) {
containerStyles = canvasStyles; containerStyles = canvasStyles;
avatarSize = AvatarSize.FIFTY_TWO; avatarSize = AvatarSize.FIFTY_TWO;

View file

@ -527,11 +527,6 @@ export const LeftPane: React.FC<PropsType> = ({
const widthBreakpoint = getConversationListWidthBreakpoint(width); const widthBreakpoint = getConversationListWidthBreakpoint(width);
// We disable this lint rule because we're trying to capture bubbled events. See [the
// lint rule's docs][0].
//
// [0]: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/645900a0e296ca7053dbf6cd9e12cc85849de2d5/docs/rules/no-static-element-interactions.md#case-the-event-handler-is-only-being-used-to-capture-bubbled-events
/* eslint-disable jsx-a11y/no-static-element-interactions */
return ( return (
<div <div
className={classNames( className={classNames(

View file

@ -1,4 +1,4 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import type { ReactNode } from 'react'; import type { ReactNode } from 'react';
@ -12,8 +12,7 @@ export const StopPropagation = ({
children: ReactNode; children: ReactNode;
className?: string; className?: string;
}): JSX.Element => ( }): JSX.Element => (
// eslint-disable-next-line max-len // eslint-disable-next-line jsx-a11y/no-static-element-interactions
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
<div <div
className={className} className={className}
onClick={ev => ev.stopPropagation()} onClick={ev => ev.stopPropagation()}

View file

@ -1,7 +1,6 @@
// Copyright 2020-2021 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable-next-line max-classes-per-file */
import * as React from 'react'; import * as React from 'react';
import { storiesOf } from '@storybook/react'; import { storiesOf } from '@storybook/react';
import { isBoolean } from 'lodash'; import { isBoolean } from 'lodash';

View file

@ -1,7 +1,6 @@
// Copyright 2020-2021 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable-next-line max-classes-per-file */
import * as React from 'react'; import * as React from 'react';
import { action } from '@storybook/addon-actions'; import { action } from '@storybook/addon-actions';
import { storiesOf } from '@storybook/react'; import { storiesOf } from '@storybook/react';

View file

@ -1,4 +1,4 @@
// Copyright 2018-2021 Signal Messenger, LLC // Copyright 2018-2022 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';
@ -187,7 +187,6 @@ export class Image extends React.Component<Props> {
const overlay = canClick ? ( const overlay = canClick ? (
// Not sure what this button does. // Not sure what this button does.
// eslint-disable-next-line jsx-a11y/control-has-associated-label
<button <button
type="button" type="button"
className={classNames('module-image__border-overlay', { className={classNames('module-image__border-overlay', {

View file

@ -48,8 +48,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>;

View file

@ -1,7 +1,6 @@
// Copyright 2020-2022 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable camelcase */
import { compact, isNumber, throttle, debounce } from 'lodash'; import { compact, isNumber, throttle, debounce } from 'lodash';
import { batch as batchDispatch } from 'react-redux'; import { batch as batchDispatch } from 'react-redux';
import PQueue from 'p-queue'; import PQueue from 'p-queue';

View file

@ -158,7 +158,6 @@ import { isNewReactionReplacingPrevious } from '../reactions/util';
import { parseBoostBadgeListFromServer } from '../badges/parseBadgesFromServer'; import { parseBoostBadgeListFromServer } from '../badges/parseBadgesFromServer';
import { GiftBadgeStates } from '../components/conversation/Message'; import { GiftBadgeStates } from '../components/conversation/Message';
/* eslint-disable camelcase */
/* eslint-disable more/no-then */ /* eslint-disable more/no-then */
type PropsForMessageDetail = Pick< type PropsForMessageDetail = Pick<

View file

@ -7,8 +7,6 @@ import { notarize } from 'electron-notarize';
import * as packageJson from '../../package.json'; import * as packageJson from '../../package.json';
/* eslint-disable no-console */
export async function afterAllArtifactBuild({ export async function afterAllArtifactBuild({
platformToTargets, platformToTargets,
artifactPaths, artifactPaths,

View file

@ -1,4 +1,4 @@
// Copyright 2019-2020 Signal Messenger, LLC // Copyright 2019-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import path from 'path'; import path from 'path';
@ -8,8 +8,6 @@ import { notarize } from 'electron-notarize';
import * as packageJson from '../../package.json'; import * as packageJson from '../../package.json';
/* eslint-disable no-console */
export async function afterSign({ export async function afterSign({
appOutDir, appOutDir,
packager, packager,

View file

@ -1,6 +1,5 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-console */
import { execFileSync } from 'child_process'; import { execFileSync } from 'child_process';
import { join } from 'path'; import { join } from 'path';

View file

@ -1,6 +1,5 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-console */
import asar from 'asar'; import asar from 'asar';
import assert from 'assert'; import assert from 'assert';

View file

@ -1,9 +1,8 @@
// Copyright 2019-2020 Signal Messenger, LLC // Copyright 2019-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Matching Whisper.events.trigger API // Matching Whisper.events.trigger API
// eslint-disable-next-line max-len // eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
export function trigger(name: string, ...rest: Array<any>): void { export function trigger(name: string, ...rest: Array<any>): void {
window.Whisper.events.trigger(name, ...rest); window.Whisper.events.trigger(name, ...rest);
} }

View file

@ -1,4 +1,4 @@
// Copyright 2020-2021 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/ban-types */
@ -43,9 +43,7 @@ export type AttachmentDownloadJobType = {
}; };
export type MessageMetricsType = { export type MessageMetricsType = {
id: string; id: string;
// eslint-disable-next-line camelcase
received_at: number; received_at: number;
// eslint-disable-next-line camelcase
sent_at: number; sent_at: number;
}; };
export type ConversationMetricsType = { export type ConversationMetricsType = {
@ -143,7 +141,6 @@ export type SessionType = {
export type SessionIdType = SessionType['id']; export type SessionIdType = SessionType['id'];
export type SignedPreKeyType = { export type SignedPreKeyType = {
confirmed: boolean; confirmed: boolean;
// eslint-disable-next-line camelcase
created_at: number; created_at: number;
ourUuid: UUIDStringType; ourUuid: UUIDStringType;
id: `${UUIDStringType}:${number}`; id: `${UUIDStringType}:${number}`;

View file

@ -16,7 +16,7 @@ import { dispatchItemsMiddleware } from '../shims/dispatchItemsMiddleware';
declare global { declare global {
// We want to extend `window`'s properties, so we need an interface. // We want to extend `window`'s properties, so we need an interface.
// eslint-disable-next-line no-restricted-syntax, @typescript-eslint/no-unused-vars // eslint-disable-next-line no-restricted-syntax
interface Console { interface Console {
_log: Console['log']; _log: Console['log'];
} }

View file

@ -779,7 +779,6 @@ export function getPropsForBubble(
message: MessageWithUIFieldsType, message: MessageWithUIFieldsType,
options: GetPropsForBubbleOptions options: GetPropsForBubbleOptions
): TimelineItemType { ): TimelineItemType {
// eslint-disable-next-line camelcase
const { received_at_ms: receivedAt, timestamp: messageTimestamp } = message; const { received_at_ms: receivedAt, timestamp: messageTimestamp } = message;
const timestamp = receivedAt || messageTimestamp; const timestamp = receivedAt || messageTimestamp;

View file

@ -1,8 +1,6 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-await-in-loop */
import { assert } from 'chai'; import { assert } from 'chai';
import type { MaybeAsyncIterable } from '../../util/asyncIterables'; import type { MaybeAsyncIterable } from '../../util/asyncIterables';

View file

@ -1,6 +1,6 @@
// Copyright 2022 Signal Messenger, LLC // Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-await-in-loop, no-console */ /* eslint-disable no-console */
import createDebug from 'debug'; import createDebug from 'debug';
import fs from 'fs/promises'; import fs from 'fs/promises';

View file

@ -1,11 +1,10 @@
// Copyright 2020 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable guard-for-in */ /* eslint-disable guard-for-in */
/* eslint-disable no-restricted-syntax */ /* eslint-disable no-restricted-syntax */
/* eslint-disable @typescript-eslint/ban-types */
/* /*
* Implements EventTarget * Implements EventTarget

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 camelcase */
import { isNumber } from 'lodash'; import { isNumber } from 'lodash';
import PQueue from 'p-queue'; import PQueue from 'p-queue';
@ -1723,7 +1722,6 @@ export default class MessageReceiver
} }
let p: Promise<void> = Promise.resolve(); let p: Promise<void> = Promise.resolve();
// eslint-disable-next-line no-bitwise
if (msg.flags && msg.flags & Proto.DataMessage.Flags.END_SESSION) { if (msg.flags && msg.flags & Proto.DataMessage.Flags.END_SESSION) {
if (destinationUuid) { if (destinationUuid) {
p = this.handleEndSession(new UUID(destinationUuid)); p = this.handleEndSession(new UUID(destinationUuid));
@ -1886,7 +1884,6 @@ export default class MessageReceiver
} }
let p: Promise<void> = Promise.resolve(); let p: Promise<void> = Promise.resolve();
// eslint-disable-next-line no-bitwise
const destination = envelope.sourceUuid; const destination = envelope.sourceUuid;
if (!destination) { if (!destination) {
throw new Error( throw new Error(

View file

@ -1,7 +1,6 @@
// Copyright 2020-2022 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable guard-for-in */
/* 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 */
@ -161,7 +160,6 @@ export default class OutgoingMessage {
if (message instanceof Proto.DataMessage) { if (message instanceof Proto.DataMessage) {
const content = new Proto.Content(); const content = new Proto.Content();
content.dataMessage = message; content.dataMessage = message;
// eslint-disable-next-line no-param-reassign
this.message = content; this.message = content;
} else { } else {
this.message = message; this.message = message;
@ -610,7 +608,6 @@ export default class OutgoingMessage {
}); });
} }
if (error?.message?.includes('untrusted identity for address')) { if (error?.message?.includes('untrusted identity for address')) {
// eslint-disable-next-line no-param-reassign
error.timestamp = this.timestamp; error.timestamp = this.timestamp;
log.error( log.error(
'Got "key changed" error from encrypt - no identityKey for application layer', 'Got "key changed" error from encrypt - no identityKey for application layer',

View file

@ -1,7 +1,6 @@
// Copyright 2020 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable more/no-then */
/* eslint-disable max-classes-per-file */ /* eslint-disable max-classes-per-file */
import type { KeyPairType } from './Types.d'; import type { KeyPairType } from './Types.d';

View file

@ -1,7 +1,6 @@
// Copyright 2020-2022 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-nested-ternary */
/* eslint-disable no-bitwise */ /* eslint-disable no-bitwise */
/* eslint-disable max-classes-per-file */ /* eslint-disable max-classes-per-file */
@ -805,7 +804,6 @@ export default class MessageSender {
return; return;
} }
// eslint-disable-next-line no-param-reassign
itemAvatar.attachmentPointer = await this.makeAttachmentPointer( itemAvatar.attachmentPointer = await this.makeAttachmentPointer(
attachment attachment
); );

View file

@ -1,8 +1,6 @@
// Copyright 2020-2022 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable more/no-then */
/* eslint-disable @typescript-eslint/ban-types */
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable max-classes-per-file */ /* eslint-disable max-classes-per-file */

View file

@ -5,7 +5,6 @@
/* eslint-disable no-bitwise */ /* eslint-disable no-bitwise */
/* eslint-disable guard-for-in */ /* eslint-disable guard-for-in */
/* eslint-disable no-restricted-syntax */ /* eslint-disable no-restricted-syntax */
/* eslint-disable no-nested-ternary */
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
import AbortController from 'abort-controller'; import AbortController from 'abort-controller';

View file

@ -1,8 +1,6 @@
// Copyright 2018-2021 Signal Messenger, LLC // Copyright 2018-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable max-classes-per-file */
import { get, has } from 'lodash'; import { get, has } from 'lodash';
export function toLogFormat(error: unknown): string { export function toLogFormat(error: unknown): string {

View file

@ -1,4 +1,4 @@
// Copyright 2020 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import { has } from 'lodash'; import { has } from 'lodash';
@ -12,8 +12,6 @@ import { has } from 'lodash';
* *
* See the tests for the specifics of how this works. * See the tests for the specifics of how this works.
*/ */
// We want this to work with any object, so we allow `object` here.
// eslint-disable-next-line @typescript-eslint/ban-types
export function assignWithNoUnnecessaryAllocation<T extends object>( export function assignWithNoUnnecessaryAllocation<T extends object>(
obj: Readonly<T>, obj: Readonly<T>,
source: Readonly<Partial<T>> source: Readonly<Partial<T>>

View file

@ -1,10 +1,8 @@
// Copyright 2020 Signal Messenger, LLC // Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import { has } from 'lodash'; import { has } from 'lodash';
// We want this to work with any object, so we allow `object` here.
// eslint-disable-next-line @typescript-eslint/ban-types
export function getOwn<TObject extends object, TKey extends keyof TObject>( export function getOwn<TObject extends object, TKey extends keyof TObject>(
obj: TObject, obj: TObject,
key: TKey key: TKey

View file

@ -210,11 +210,8 @@ type MediaType = {
attachments: Array<AttachmentType>; attachments: Array<AttachmentType>;
conversationId: string; conversationId: string;
id: string; id: string;
// eslint-disable-next-line camelcase
received_at: number; received_at: number;
// eslint-disable-next-line camelcase
received_at_ms: number; received_at_ms: number;
// eslint-disable-next-line camelcase
sent_at: number; sent_at: number;
}; };
}; };
@ -1805,7 +1802,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
let conversation: undefined | ConversationModel; let conversation: undefined | ConversationModel;
if (!id && isDirectConversation(this.model.attributes)) { if (!id && isDirectConversation(this.model.attributes)) {
// eslint-disable-next-line prefer-destructuring
conversation = this.model; conversation = this.model;
} else { } else {
conversation = window.ConversationController.get(id); conversation = window.ConversationController.get(id);

View file

@ -1,4 +1,4 @@
// Copyright 2018-2021 Signal Messenger, LLC // Copyright 2018-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import { ipcRenderer } from 'electron'; import { ipcRenderer } from 'electron';
@ -23,8 +23,7 @@ type FSAttrType = {
let xattr: FSAttrType | undefined; let xattr: FSAttrType | undefined;
try { try {
// eslint-disable-next-line max-len // eslint-disable-next-line global-require, import/no-extraneous-dependencies
// eslint-disable-next-line global-require, import/no-extraneous-dependencies, import/no-unresolved
xattr = require('fs-xattr'); xattr = require('fs-xattr');
} catch (e) { } catch (e) {
window.SignalContext.log?.info('x-attr dependency did not load successfully'); window.SignalContext.log?.info('x-attr dependency did not load successfully');