socket, binary, usync: fix linting

This commit is contained in:
Rajeh Taher
2025-03-14 23:38:53 +02:00
parent aa0579d12d
commit a29138758c
4 changed files with 4 additions and 4 deletions

View File

@@ -522,7 +522,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
const stanza: BinaryNode = {
tag: 'message',
attrs: {
id: msgId!,
id: msgId,
type: getMessageType(message),
...(additionalAttributes || {})
},

View File

@@ -65,7 +65,7 @@ export const makeSocket = (config: SocketConfig) => {
} = config
if(printQRInTerminal) {
console.warn('⚠️ The printQRInTerminal option has been deprecated. You will no longer receive QR codes in the terminal automatically. Please listen to the connection.update event yourself and handle the QR your way. You can remove this message by removing this opttion. This message will be removed in a future version.')
console.warn('⚠️ The printQRInTerminal option has been deprecated. You will no longer receive QR codes in the terminal automatically. Please listen to the connection.update event yourself and handle the QR your way. You can remove this message by removing this opttion. This message will be removed in a future version.')
}
const url = typeof waWebSocketUrl === 'string' ? new URL(waWebSocketUrl) : waWebSocketUrl

View File

@@ -6,7 +6,7 @@ import { BinaryNode } from './types'
export const getBinaryNodeChildren = (node: BinaryNode | undefined, childTag: string) => {
if(Array.isArray(node?.content)) {
return node!.content.filter(item => item.tag === childTag)
return node.content.filter(item => item.tag === childTag)
}
return []

View File

@@ -48,7 +48,7 @@ export class USyncDeviceProtocol implements USyncQueryProtocol {
const keyIndexNode = getBinaryNodeChild(node, 'key-index-list')
if(Array.isArray(deviceListNode?.content)) {
for(const { tag, attrs } of deviceListNode!.content) {
for(const { tag, attrs } of deviceListNode.content) {
const id = +attrs.id
const keyIndex = +attrs['key-index']
if(tag === 'device') {