chore: run eslint --fix in onebot module

This commit is contained in:
Wesley F. Young committed 2024-08-09 20:35:03 +08:00
1 parent f5b6fa31a7
commit af01a073ef
110 files changed
+3830 -3827

No files matched your search

+13 -13
View File
@@ -6,18 +6,18 @@ import { isNull } from '@/common/utils/helper';
export function wsReply(wsClient: WebSocketClass, data: OB11Response | PostEventType) {
try {
const packet = Object.assign({}, data);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
if (isNull(packet['echo'])) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
delete packet['echo'];
try {
const packet = Object.assign({}, data);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
if (isNull(packet['echo'])) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
delete packet['echo'];
}
wsClient.send(JSON.stringify(packet));
logDebug('ws 消息上报', wsClient.url || '', data);
} catch (e: any) {
logError('websocket 回复失败', e.stack, data);
}
wsClient.send(JSON.stringify(packet));
logDebug('ws 消息上报', wsClient.url || '', data);
} catch (e: any) {
logError('websocket 回复失败', e.stack, data);
}
}