Migrate to eslint
This commit is contained in:
parent
0fe7e30398
commit
b4e9c278d3
27 changed files with 104 additions and 71 deletions
|
@ -1,18 +1,21 @@
|
|||
export function getSearchResultsProps(attributes: any) {
|
||||
// @ts-ignore
|
||||
// Matching Whisper.Message API
|
||||
// eslint-disable-next-line max-len
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||
export function getSearchResultsProps(attributes: any): any {
|
||||
const model = new window.Whisper.Message(attributes);
|
||||
|
||||
return model.getPropsForSearchResult();
|
||||
}
|
||||
|
||||
export function getBubbleProps(attributes: any) {
|
||||
// @ts-ignore
|
||||
// Matching Whisper.Message API
|
||||
// eslint-disable-next-line max-len
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||
export function getBubbleProps(attributes: any): any {
|
||||
const model = new window.Whisper.Message(attributes);
|
||||
|
||||
return model.getPropsForBubble();
|
||||
}
|
||||
|
||||
export function showSettings() {
|
||||
// @ts-ignore
|
||||
export function showSettings(): void {
|
||||
window.showSettings();
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { ipcRenderer } from 'electron';
|
||||
|
||||
export function bounceAppIconStart(isCritical = false) {
|
||||
export function bounceAppIconStart(isCritical = false): void {
|
||||
ipcRenderer.send('bounce-app-icon-start', isCritical);
|
||||
}
|
||||
|
||||
export function bounceAppIconStop() {
|
||||
export function bounceAppIconStop(): void {
|
||||
ipcRenderer.send('bounce-app-icon-stop');
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
export function trigger(name: string, param1?: any, param2?: any) {
|
||||
// Matching Whisper.events.trigger API
|
||||
// eslint-disable-next-line max-len
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
||||
export function trigger(name: string, param1?: any, param2?: any): void {
|
||||
window.Whisper.events.trigger(name, param1, param2);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export function getSocketStatus() {
|
||||
export function getSocketStatus(): number {
|
||||
const { getSocketStatus: getMessageReceiverStatus } = window;
|
||||
|
||||
return getMessageReceiverStatus();
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
export function put(key: string, value: any) {
|
||||
// Matching window.storage.put API
|
||||
// eslint-disable-next-line max-len
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||
export function put(key: string, value: any): void {
|
||||
window.storage.put(key, value);
|
||||
}
|
||||
|
||||
export async function remove(key: string) {
|
||||
export async function remove(key: string): Promise<void> {
|
||||
await window.storage.remove(key);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ export function sendStickerPackSync(
|
|||
packId: string,
|
||||
packKey: string,
|
||||
installed: boolean
|
||||
) {
|
||||
): void {
|
||||
const { ConversationController, textsecure, log } = window;
|
||||
const ourNumber = textsecure.storage.user.getNumber();
|
||||
const { wrap, sendOptions } = ConversationController.prepareForSend(
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { ipcRenderer } from 'electron';
|
||||
|
||||
export function startUpdate() {
|
||||
export function startUpdate(): void {
|
||||
ipcRenderer.send('start-update');
|
||||
}
|
||||
|
||||
export function ackRender() {
|
||||
export function ackRender(): void {
|
||||
ipcRenderer.send('show-update-dialog-ack');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue