chore: add stronger lint rules

This commit is contained in:
Adhiraj Singh
2022-08-18 10:37:40 +05:30
parent 8d6e00eab6
commit c5917364ba
10 changed files with 101 additions and 103 deletions

View File

@@ -206,7 +206,7 @@ export const printQRIfNecessaryListener = (ev: CommonBaileysEventEmitter<any>, l
ev.on('connection.update', async({ qr }) => {
if(qr) {
const QR = await import('qrcode-terminal')
.catch(err => {
.catch(() => {
logger.error('QR code terminal not added as dependency')
})
QR?.generate(qr, { small: true })

View File

@@ -561,8 +561,6 @@ export const getWAUploadToServer = ({ customUploadHosts, fetchAgent, logger }: C
}
}
const GCM_AUTH_TAG_LENGTH: number | undefined = 128 >> 3
const getMediaRetryKey = (mediaKey: Buffer | Uint8Array) => {
return hkdf(mediaKey, 32, { info: 'WhatsApp Media Retry Notification' })
}

View File

@@ -101,7 +101,7 @@ export const signalStorage = ({ creds, keys }: SignalAuthState) => ({
}
},
removePreKey: (id: number) => keys.set({ 'pre-key': { [id]: null } }),
loadSignedPreKey: (keyId: number) => {
loadSignedPreKey: () => {
const key = creds.signedPreKey
return {
privKey: Buffer.from(key.keyPair.private),