mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
fix(lint): drop disable comments for a rule typescript-eslint 8 removed
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]>
This commit is contained in:
@@ -25,5 +25,4 @@ export const AuthenticationErrorCode = {
|
||||
} as const;
|
||||
|
||||
export type AuthenticationErrorCode =
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
(typeof AuthenticationErrorCode)[keyof typeof AuthenticationErrorCode] | (string & {});
|
||||
|
||||
@@ -39,7 +39,6 @@ const allMessages = async () => {
|
||||
|
||||
type AllI18nInstances = { [K in SupportedLanguages]: I18n };
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||
export const allI18nInstances = remember('i18n.allI18nInstances', async () => {
|
||||
const loadedMessages = await allMessages();
|
||||
|
||||
@@ -56,7 +55,6 @@ export const allI18nInstances = remember('i18n.allI18nInstances', async () => {
|
||||
}, {}) as AllI18nInstances;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export const getI18nInstance = async (lang?: SupportedLanguages | (string & {})) => {
|
||||
const instances = await allI18nInstances;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import { encryptSecondaryData } from '../crypto/encrypt';
|
||||
|
||||
export type GetAuditLogsPdfOptions = {
|
||||
documentId: number;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
language?: SupportedLanguageCodes | (string & {});
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import { encryptSecondaryData } from '../crypto/encrypt';
|
||||
|
||||
export type GetCertificatePdfOptions = {
|
||||
documentId: number;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
language?: SupportedLanguageCodes | (string & {});
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
type EnvKey = keyof NodeJS.ProcessEnv | (string & {});
|
||||
type EnvValue<K extends EnvKey> = K extends keyof NodeJS.ProcessEnv
|
||||
? NodeJS.ProcessEnv[K]
|
||||
|
||||
Reference in New Issue
Block a user