build: migrate eslint to v10 flat config and upgrade typescript
Replace .eslintrc.json with eslint.config.js using the new flat config format required by ESLint 10. Swap @typescript-eslint/eslint-plugin and @typescript-eslint/parser for the unified typescript-eslint package. Upgrade TypeScript to 5.9 and @types/node to 25. Apply automatic code fixes: remove unused catch bindings and preserve error cause in auth header parsing.
This commit is contained in:
1 parent
4a191afdec
commit
75908e624f
27 files changed
+1146
-1595
No files matched your search
+4
-4
@@ -89,7 +89,7 @@ async function authenticate(
|
||||
authentication = auth.parseAuthorizationHeader(
|
||||
sessionContext.httpRequest.headers["authorization"],
|
||||
);
|
||||
} catch (err) {
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1274,7 +1274,7 @@ async function clientError(
|
||||
body: string,
|
||||
msg: string,
|
||||
): Promise<void> {
|
||||
let debugEnabled = false;
|
||||
let debugEnabled: boolean;
|
||||
let deviceId: string = null;
|
||||
|
||||
if (sessionContext) {
|
||||
@@ -1312,7 +1312,7 @@ async function clientError(
|
||||
function decodeString(buffer: Buffer, charset: string): string {
|
||||
try {
|
||||
return buffer.toString(charset as BufferEncoding);
|
||||
} catch (err) {
|
||||
} catch {
|
||||
if (encodingExists(charset)) return decode(buffer, charset);
|
||||
}
|
||||
return null;
|
||||
@@ -1383,7 +1383,7 @@ async function listenerAsync(
|
||||
// connection is closed before the stream is finished.
|
||||
// For Node 12.9+ we can just use stream.readableEnded
|
||||
if (!readableEnded) throw new Error("Connection closed");
|
||||
} catch (err) {
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user