mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
Six lines disabled @typescript-eslint/ban-types over `string & {}`, the
union that keeps a string type's known values in autocomplete.
typescript-eslint 8 removed ban-types, and ESLint 10 reports a disable
comment for a rule that does not exist as an error — "Definition for rule
'@typescript-eslint/ban-types' was not found" — so each of them failed the
lint. Its successors do not flag `{}` inside an intersection, so with the
comments gone nothing is reported on those lines. Five go here; the sixth,
in render-email-with-i18n.tsx, goes with that file's other lint fix.
Co-authored-by: Hanzo Dev <[email protected]>
29 lines
1.2 KiB
TypeScript
29 lines
1.2 KiB
TypeScript
export const AuthenticationErrorCode = {
|
|
AccountDisabled: 'ACCOUNT_DISABLED',
|
|
Unauthorized: 'UNAUTHORIZED',
|
|
InvalidCredentials: 'INVALID_CREDENTIALS',
|
|
SessionNotFound: 'SESSION_NOT_FOUND',
|
|
SessionExpired: 'SESSION_EXPIRED',
|
|
InvalidToken: 'INVALID_TOKEN',
|
|
MissingToken: 'MISSING_TOKEN',
|
|
InvalidRequest: 'INVALID_REQUEST',
|
|
UnverifiedEmail: 'UNVERIFIED_EMAIL',
|
|
NotFound: 'NOT_FOUND',
|
|
NotSetup: 'NOT_SETUP',
|
|
|
|
// InternalSeverError: 'INTERNAL_SEVER_ERROR',
|
|
// TwoFactorAlreadyEnabled: 'TWO_FACTOR_ALREADY_ENABLED',
|
|
// TwoFactorSetupRequired: 'TWO_FACTOR_SETUP_REQUIRED',
|
|
// TwoFactorMissingSecret: 'TWO_FACTOR_MISSING_SECRET',
|
|
// TwoFactorMissingCredentials: 'TWO_FACTOR_MISSING_CREDENTIALS',
|
|
InvalidTwoFactorCode: 'INVALID_TWO_FACTOR_CODE',
|
|
// IncorrectTwoFactorBackupCode: 'INCORRECT_TWO_FACTOR_BACKUP_CODE',
|
|
// IncorrectIdentityProvider: 'INCORRECT_IDENTITY_PROVIDER',
|
|
// IncorrectPassword: 'INCORRECT_PASSWORD',
|
|
// MissingEncryptionKey: 'MISSING_ENCRYPTION_KEY',
|
|
// MissingBackupCode: 'MISSING_BACKUP_CODE',
|
|
} as const;
|
|
|
|
export type AuthenticationErrorCode =
|
|
(typeof AuthenticationErrorCode)[keyof typeof AuthenticationErrorCode] | (string & {});
|