Fix CoPilot/Lint complaints

This commit is contained in:
Marc Brooks 2025-11-05 14:56:27 -06:00
parent e12ddaff79
commit 2698fbd541
No known key found for this signature in database
GPG Key ID: 583A6AF2D6AE1DC6
2 changed files with 3 additions and 4 deletions

View File

@ -52,7 +52,6 @@ func GetQueueIndex(messageType MessageType) (int, time.Duration) {
return MacroQueue, 60 * time.Second
default:
return OtherQueue, 5 * time.Second
}
}

View File

@ -386,7 +386,7 @@ export class CancelKeyboardMacroReportMessage extends RpcMessage {
constructor(token: string) {
super(HID_RPC_MESSAGE_TYPES.CancelKeyboardMacroReport);
this.token = (token == null || token === undefined || token === "")
this.token = (token == null || token === "")
? "00000000-0000-0000-0000-000000000000"
: token;
}
@ -397,11 +397,11 @@ export class CancelKeyboardMacroReportMessage extends RpcMessage {
}
public static unmarshal(data: Uint8Array): CancelKeyboardMacroReportMessage | undefined {
if (data.length == 0) {
if (data.length === 0) {
return new CancelKeyboardMacroReportMessage("00000000-0000-0000-0000-000000000000");
}
if (data.length != 16) {
if (data.length !== 16) {
throw new Error(`Invalid cancel message length: ${data.length}`);
}