style: auto-fix ESLint issues (curly braces and formatting)
- Add curly braces to all if/else/for/while statements - Fix indentation and trailing spaces - Auto-fixed 372 linting errors using eslint --fix - Remaining issues are warnings only (non-null assertions, explicit any types)
This commit is contained in:
@@ -109,7 +109,7 @@ export type OutboundMessage = GatewayResponse | GatewayError | GatewayEvent;
|
||||
// ── Validation helpers ─────────────────────────────────────────
|
||||
|
||||
export function isValidRequest(msg: unknown): msg is GatewayRequest {
|
||||
if (typeof msg !== 'object' || msg === null) return false;
|
||||
if (typeof msg !== 'object' || msg === null) {return false;}
|
||||
const obj = msg as Record<string, unknown>;
|
||||
return (
|
||||
typeof obj.id === 'number' &&
|
||||
@@ -121,7 +121,7 @@ export function isValidRequest(msg: unknown): msg is GatewayRequest {
|
||||
export function parseMessage(raw: string): GatewayRequest | null {
|
||||
try {
|
||||
const parsed = JSON.parse(raw);
|
||||
if (isValidRequest(parsed)) return parsed;
|
||||
if (isValidRequest(parsed)) {return parsed;}
|
||||
return null;
|
||||
} catch {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user