Phase 10: запрет inline eslint-disable, file-level overrides, IUser-тип

This commit is contained in:
Suslov-MD
2026-08-16 17:06:45 +00:00
parent 65c44f570c
commit dad4642197
22 changed files with 144 additions and 67 deletions
-2
View File
@@ -16,12 +16,10 @@ function errorCodeOf(body: unknown): string | undefined {
if (typeof body !== 'object' || body === null) {
return undefined;
}
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- извлечение полей из unknown
const error = (body as { error?: unknown }).error;
if (typeof error !== 'object' || error === null) {
return undefined;
}
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- извлечение полей из unknown
const code = (error as { code?: unknown }).code;
return typeof code === 'string' ? code : undefined;
}