diff --git a/ts/components/conversation/InlineNotificationWrapper.tsx b/ts/components/conversation/InlineNotificationWrapper.tsx index cbb7ccbfd..d95f60d8f 100644 --- a/ts/components/conversation/InlineNotificationWrapper.tsx +++ b/ts/components/conversation/InlineNotificationWrapper.tsx @@ -22,8 +22,6 @@ export class InlineNotificationWrapper extends React.Component { }; public handleFocus = (): void => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore if (window.getInteractionMode() === 'keyboard') { this.setSelected(); } diff --git a/ts/components/conversation/Timeline.tsx b/ts/components/conversation/Timeline.tsx index fdbc34540..095a6311c 100644 --- a/ts/components/conversation/Timeline.tsx +++ b/ts/components/conversation/Timeline.tsx @@ -442,9 +442,9 @@ export class Timeline extends React.PureComponent { this.offsetFromBottom = undefined; this.resizeFlag = false; if (isNumber(row) && row > 0) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - this.cellSizeCache.clearPlus(row, 0); + // This is a private interface we want to use. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this.cellSizeCache as any).clearPlus(row, 0); } else { this.cellSizeCache.clearAll(); } @@ -1010,14 +1010,10 @@ export class Timeline extends React.PureComponent { public override componentDidMount(): void { this.updateWithVisibleRows(); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore window.registerForActive(this.updateWithVisibleRows); } public override componentWillUnmount(): void { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore window.unregisterForActive(this.updateWithVisibleRows); } diff --git a/ts/components/conversation/TimelineItem.stories.tsx b/ts/components/conversation/TimelineItem.stories.tsx index 849407710..7313dbd76 100644 --- a/ts/components/conversation/TimelineItem.stories.tsx +++ b/ts/components/conversation/TimelineItem.stories.tsx @@ -493,21 +493,19 @@ storiesOf('Components/Conversation/TimelineItem', module) ); }) .add('Unknown Type', () => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore: intentional const item = { type: 'random', data: { somethin: 'somethin', }, - } as TimelineItemProps['item']; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any as TimelineItemProps['item']; return ; }) .add('Missing Item', () => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore: intentional - const item = null as TimelineItemProps['item']; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const item = null as any as TimelineItemProps['item']; return ; }); diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index abc909658..bec6e06c0 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -165,11 +165,6 @@ export class ConversationModel extends window.Backbone debouncedUpdateLastMessage?: () => void; - // backbone ensures this exists - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - id: string; - initialPromise?: Promise; inProgressFetch?: Promise; @@ -3303,10 +3298,6 @@ export class ConversationModel extends window.Backbone this.get('e164')!, regionCode ); - // TODO: DESKTOP-723 - // This is valid, but the typing thinks it's a function. - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore if (number.isValidNumber) { this.set({ e164: number.e164 }); return null; diff --git a/ts/services/audioRecorder.ts b/ts/services/audioRecorder.ts index eda90b743..41be88a03 100644 --- a/ts/services/audioRecorder.ts +++ b/ts/services/audioRecorder.ts @@ -69,8 +69,9 @@ export class RecorderClass { try { const stream = await navigator.mediaDevices.getUserMedia({ - // @ts-expect-error Typescript doesn't know about these important options - audio: { mandatory: { googAutoGainControl: false } }, + // TypeScript doesn't know about these options. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + audio: { mandatory: { googAutoGainControl: false } } as any, }); if (!this.context || !this.input) { const err = new Error( diff --git a/ts/sql/Client.ts b/ts/sql/Client.ts index e63da5dd7..fa665d7d2 100644 --- a/ts/sql/Client.ts +++ b/ts/sql/Client.ts @@ -581,9 +581,7 @@ function makeChannel(fnName: string) { try { // Ignoring this error TS2556: Expected 3 arguments, but got 0 or more. - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - return await Server[serverFnName](...args); + return await (Server[serverFnName] as Function)(...args); } catch (error) { if (isCorruptionError(error)) { log.error( diff --git a/ts/state/ducks/search.ts b/ts/state/ducks/search.ts index 50b353834..d30935068 100644 --- a/ts/state/ducks/search.ts +++ b/ts/state/ducks/search.ts @@ -273,13 +273,6 @@ async function queryConversationsAndContacts( } } - // // @ts-ignore - // console._log( - // '%cqueryConversationsAndContacts', - // 'background:black;color:red;', - // { searchResults, conversations, ourNumber, ourUuid } - // ); - // Inject synthetic Note to Self entry if query matches localized 'Note to Self' if (noteToSelf.indexOf(providedQuery.toLowerCase()) !== -1) { // ensure that we don't have duplicates in our results