From d3cfcee4631e8d7588eb75309f58de5528f4b5d5 Mon Sep 17 00:00:00 2001 From: dw-0 Date: Thu, 24 Oct 2024 17:15:33 +0200 Subject: [PATCH] fix: @typescript-eslint/consistent-type-definitions Signed-off-by: Dominik Willner --- .eslintrc.json | 1 - apps/api/src/app/auth/interfaces/simplewebauthn.ts | 4 ++-- libs/common/src/lib/types/toggle-option.type.ts | 4 ++-- libs/common/src/lib/types/x-ray-rules-settings.type.ts | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index cdda2a982..a66ee6f02 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -142,7 +142,6 @@ // The following rules are part of @typescript-eslint/stylistic-type-checked // and can be remove once solved - "@typescript-eslint/consistent-type-definitions": "warn", "@typescript-eslint/prefer-function-type": "warn", "@typescript-eslint/prefer-nullish-coalescing": "warn", // TODO: Requires strictNullChecks: true "@typescript-eslint/consistent-type-assertions": "warn", diff --git a/apps/api/src/app/auth/interfaces/simplewebauthn.ts b/apps/api/src/app/auth/interfaces/simplewebauthn.ts index 4b9058e2f..ef0a14ffa 100644 --- a/apps/api/src/app/auth/interfaces/simplewebauthn.ts +++ b/apps/api/src/app/auth/interfaces/simplewebauthn.ts @@ -198,12 +198,12 @@ export interface AuthenticatorAssertionResponseJSON /** * A WebAuthn-compatible device and the information needed to verify assertions by it */ -export declare type AuthenticatorDevice = { +export declare interface AuthenticatorDevice { credentialPublicKey: Buffer; credentialID: Buffer; counter: number; transports?: AuthenticatorTransport[]; -}; +} /** * An attempt to communicate that this isn't just any string, but a Base64URL-encoded string */ diff --git a/libs/common/src/lib/types/toggle-option.type.ts b/libs/common/src/lib/types/toggle-option.type.ts index 25ba4d7d2..ca7b16bb2 100644 --- a/libs/common/src/lib/types/toggle-option.type.ts +++ b/libs/common/src/lib/types/toggle-option.type.ts @@ -1,4 +1,4 @@ -export type ToggleOption = { +export interface ToggleOption { label: string; value: string; -}; +} diff --git a/libs/common/src/lib/types/x-ray-rules-settings.type.ts b/libs/common/src/lib/types/x-ray-rules-settings.type.ts index 8808162f5..f38a8e6a9 100644 --- a/libs/common/src/lib/types/x-ray-rules-settings.type.ts +++ b/libs/common/src/lib/types/x-ray-rules-settings.type.ts @@ -1,4 +1,4 @@ -export type XRayRulesSettings = { +export interface XRayRulesSettings { AccountClusterRiskCurrentInvestment?: RuleSettings; AccountClusterRiskSingleAccount?: RuleSettings; AllocationClusterRiskDevelopedMarkets?: RuleSettings; @@ -7,7 +7,7 @@ export type XRayRulesSettings = { CurrencyClusterRiskCurrentInvestment?: RuleSettings; EmergencyFundSetup?: RuleSettings; FeeRatioInitialInvestment?: RuleSettings; -}; +} interface RuleSettings { isActive: boolean;