ESLint: warn for deprecated constructs

This commit is contained in:
Rory& committed 2025-12-19 19:35:54 +01:00
1 parent 11a0744edc
commit 3636d615db
5 files changed
+32 -10

No files matched your search

+5 -1
View File
@@ -49,7 +49,11 @@ export function snowflakeBasedInvite() {
snowflake = snowflake / base;
}
return str.substr(3, 8).split("").reverse().join("");
return str
.slice(3, 3 + 8)
.split("")
.reverse()
.join("");
}
export function randomUpperString(length: number = 10) {
+2 -2
View File
@@ -204,8 +204,8 @@ class UnixSocketListener {
while (buffer.length >= 4) {
const msgLen = buffer.readUInt32BE(0);
if (buffer.length < 4 + msgLen) break;
const msgBuf = buffer.slice(4, 4 + msgLen);
buffer = buffer.slice(4 + msgLen);
const msgBuf = buffer.subarray(4, 4 + msgLen);
buffer = buffer.subarray(4 + msgLen);
try {
const payload = JSON.parse(msgBuf.toString());
this.eventEmitter.emit(payload.id, payload.event);