Feature/switch the consistent-type-definitions eslint rule from warn to error (#3980)
* Switch the consistent-type-definitions eslint rule from warn to error * Update changelog --------- Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
parent
76ff34b0c4
commit
405ec0d2b2
@ -142,7 +142,6 @@
|
|||||||
|
|
||||||
// The following rules are part of @typescript-eslint/stylistic-type-checked
|
// The following rules are part of @typescript-eslint/stylistic-type-checked
|
||||||
// and can be remove once solved
|
// and can be remove once solved
|
||||||
"@typescript-eslint/consistent-type-definitions": "warn",
|
|
||||||
"@typescript-eslint/prefer-function-type": "warn",
|
"@typescript-eslint/prefer-function-type": "warn",
|
||||||
"@typescript-eslint/prefer-nullish-coalescing": "warn", // TODO: Requires strictNullChecks: true
|
"@typescript-eslint/prefer-nullish-coalescing": "warn", // TODO: Requires strictNullChecks: true
|
||||||
"@typescript-eslint/consistent-type-assertions": "warn",
|
"@typescript-eslint/consistent-type-assertions": "warn",
|
||||||
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Switched the `consistent-type-definitions` rule from `warn` to `error` in the `eslint` configuration
|
||||||
- Switched the `no-empty-function` rule from `warn` to `error` in the `eslint` configuration
|
- Switched the `no-empty-function` rule from `warn` to `error` in the `eslint` configuration
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -198,12 +198,12 @@ export interface AuthenticatorAssertionResponseJSON
|
|||||||
/**
|
/**
|
||||||
* A WebAuthn-compatible device and the information needed to verify assertions by it
|
* A WebAuthn-compatible device and the information needed to verify assertions by it
|
||||||
*/
|
*/
|
||||||
export declare type AuthenticatorDevice = {
|
export declare interface AuthenticatorDevice {
|
||||||
credentialPublicKey: Buffer;
|
credentialPublicKey: Buffer;
|
||||||
credentialID: Buffer;
|
credentialID: Buffer;
|
||||||
counter: number;
|
counter: number;
|
||||||
transports?: AuthenticatorTransport[];
|
transports?: AuthenticatorTransport[];
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* An attempt to communicate that this isn't just any string, but a Base64URL-encoded string
|
* An attempt to communicate that this isn't just any string, but a Base64URL-encoded string
|
||||||
*/
|
*/
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { IsCurrencyCode } from '@ghostfolio/api/validators/is-currency-code';
|
import { IsCurrencyCode } from '@ghostfolio/api/validators/is-currency-code';
|
||||||
|
import { XRayRulesSettings } from '@ghostfolio/common/interfaces';
|
||||||
import type {
|
import type {
|
||||||
ColorScheme,
|
ColorScheme,
|
||||||
DateRange,
|
DateRange,
|
||||||
HoldingsViewMode,
|
HoldingsViewMode,
|
||||||
ViewMode,
|
ViewMode
|
||||||
XRayRulesSettings
|
|
||||||
} from '@ghostfolio/common/types';
|
} from '@ghostfolio/common/types';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -4,14 +4,11 @@ import { UserService } from '@ghostfolio/client/services/user/user.service';
|
|||||||
import {
|
import {
|
||||||
AssetProfileIdentifier,
|
AssetProfileIdentifier,
|
||||||
PortfolioPosition,
|
PortfolioPosition,
|
||||||
|
ToggleOption,
|
||||||
User
|
User
|
||||||
} from '@ghostfolio/common/interfaces';
|
} from '@ghostfolio/common/interfaces';
|
||||||
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
|
||||||
import {
|
import { HoldingType, HoldingsViewMode } from '@ghostfolio/common/types';
|
||||||
HoldingType,
|
|
||||||
HoldingsViewMode,
|
|
||||||
ToggleOption
|
|
||||||
} from '@ghostfolio/common/types';
|
|
||||||
|
|
||||||
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
|
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import { PortfolioReportRule } from '@ghostfolio/common/interfaces';
|
import {
|
||||||
import { XRayRulesSettings } from '@ghostfolio/common/types';
|
PortfolioReportRule,
|
||||||
|
XRayRulesSettings
|
||||||
|
} from '@ghostfolio/common/interfaces';
|
||||||
|
|
||||||
export interface IRuleSettingsDialogParams {
|
export interface IRuleSettingsDialogParams {
|
||||||
rule: PortfolioReportRule;
|
rule: PortfolioReportRule;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { XRayRulesSettings } from '@ghostfolio/common/types';
|
import { XRayRulesSettings } from '@ghostfolio/common/interfaces';
|
||||||
|
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { Component, Inject } from '@angular/core';
|
import { Component, Inject } from '@angular/core';
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
import { UpdateUserSettingDto } from '@ghostfolio/api/app/user/update-user-setting.dto';
|
import { UpdateUserSettingDto } from '@ghostfolio/api/app/user/update-user-setting.dto';
|
||||||
import { RuleSettings } from '@ghostfolio/api/models/interfaces/rule-settings.interface';
|
import { RuleSettings } from '@ghostfolio/api/models/interfaces/rule-settings.interface';
|
||||||
import { PortfolioReportRule } from '@ghostfolio/common/interfaces';
|
import {
|
||||||
import { XRayRulesSettings } from '@ghostfolio/common/types';
|
PortfolioReportRule,
|
||||||
|
XRayRulesSettings
|
||||||
|
} from '@ghostfolio/common/interfaces';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { UpdateUserSettingDto } from '@ghostfolio/api/app/user/update-user-setting.dto';
|
import { UpdateUserSettingDto } from '@ghostfolio/api/app/user/update-user-setting.dto';
|
||||||
import { PortfolioReportRule } from '@ghostfolio/common/interfaces';
|
import {
|
||||||
import { XRayRulesSettings } from '@ghostfolio/common/types';
|
PortfolioReportRule,
|
||||||
|
XRayRulesSettings
|
||||||
|
} from '@ghostfolio/common/interfaces';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ToggleOption } from '@ghostfolio/common/types';
|
import { ToggleOption } from '@ghostfolio/common/interfaces';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
|
@ -4,13 +4,14 @@ import { ImpersonationStorageService } from '@ghostfolio/client/services/imperso
|
|||||||
import { UserService } from '@ghostfolio/client/services/user/user.service';
|
import { UserService } from '@ghostfolio/client/services/user/user.service';
|
||||||
import {
|
import {
|
||||||
HistoricalDataItem,
|
HistoricalDataItem,
|
||||||
|
InvestmentItem,
|
||||||
PortfolioInvestments,
|
PortfolioInvestments,
|
||||||
PortfolioPerformance,
|
PortfolioPerformance,
|
||||||
PortfolioPosition,
|
PortfolioPosition,
|
||||||
|
ToggleOption,
|
||||||
User
|
User
|
||||||
} from '@ghostfolio/common/interfaces';
|
} from '@ghostfolio/common/interfaces';
|
||||||
import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface';
|
import { GroupBy } from '@ghostfolio/common/types';
|
||||||
import { GroupBy, ToggleOption } from '@ghostfolio/common/types';
|
|
||||||
import { translate } from '@ghostfolio/ui/i18n';
|
import { translate } from '@ghostfolio/ui/i18n';
|
||||||
|
|
||||||
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
|
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
|
||||||
|
@ -50,8 +50,10 @@ import type { Subscription } from './subscription.interface';
|
|||||||
import type { SymbolMetrics } from './symbol-metrics.interface';
|
import type { SymbolMetrics } from './symbol-metrics.interface';
|
||||||
import type { SystemMessage } from './system-message.interface';
|
import type { SystemMessage } from './system-message.interface';
|
||||||
import type { TabConfiguration } from './tab-configuration.interface';
|
import type { TabConfiguration } from './tab-configuration.interface';
|
||||||
|
import type { ToggleOption } from './toggle-option.interface';
|
||||||
import type { UserSettings } from './user-settings.interface';
|
import type { UserSettings } from './user-settings.interface';
|
||||||
import type { User } from './user.interface';
|
import type { User } from './user.interface';
|
||||||
|
import type { XRayRulesSettings } from './x-ray-rules-settings.interface';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Access,
|
Access,
|
||||||
@ -104,6 +106,8 @@ export {
|
|||||||
Subscription,
|
Subscription,
|
||||||
SymbolMetrics,
|
SymbolMetrics,
|
||||||
TabConfiguration,
|
TabConfiguration,
|
||||||
|
ToggleOption,
|
||||||
User,
|
User,
|
||||||
UserSettings
|
UserSettings,
|
||||||
|
XRayRulesSettings
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export type ToggleOption = {
|
export interface ToggleOption {
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
};
|
}
|
@ -1,9 +1,9 @@
|
|||||||
|
import { XRayRulesSettings } from '@ghostfolio/common/interfaces/x-ray-rules-settings.interface';
|
||||||
import {
|
import {
|
||||||
ColorScheme,
|
ColorScheme,
|
||||||
DateRange,
|
DateRange,
|
||||||
HoldingsViewMode,
|
HoldingsViewMode,
|
||||||
ViewMode,
|
ViewMode
|
||||||
XRayRulesSettings
|
|
||||||
} from '@ghostfolio/common/types';
|
} from '@ghostfolio/common/types';
|
||||||
|
|
||||||
export interface UserSettings {
|
export interface UserSettings {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export type XRayRulesSettings = {
|
export interface XRayRulesSettings {
|
||||||
AccountClusterRiskCurrentInvestment?: RuleSettings;
|
AccountClusterRiskCurrentInvestment?: RuleSettings;
|
||||||
AccountClusterRiskSingleAccount?: RuleSettings;
|
AccountClusterRiskSingleAccount?: RuleSettings;
|
||||||
AllocationClusterRiskDevelopedMarkets?: RuleSettings;
|
AllocationClusterRiskDevelopedMarkets?: RuleSettings;
|
||||||
@ -7,7 +7,7 @@ export type XRayRulesSettings = {
|
|||||||
CurrencyClusterRiskCurrentInvestment?: RuleSettings;
|
CurrencyClusterRiskCurrentInvestment?: RuleSettings;
|
||||||
EmergencyFundSetup?: RuleSettings;
|
EmergencyFundSetup?: RuleSettings;
|
||||||
FeeRatioInitialInvestment?: RuleSettings;
|
FeeRatioInitialInvestment?: RuleSettings;
|
||||||
};
|
}
|
||||||
|
|
||||||
interface RuleSettings {
|
interface RuleSettings {
|
||||||
isActive: boolean;
|
isActive: boolean;
|
@ -16,10 +16,8 @@ import type { Market } from './market.type';
|
|||||||
import type { OrderWithAccount } from './order-with-account.type';
|
import type { OrderWithAccount } from './order-with-account.type';
|
||||||
import type { RequestWithUser } from './request-with-user.type';
|
import type { RequestWithUser } from './request-with-user.type';
|
||||||
import type { SubscriptionOffer } from './subscription-offer.type';
|
import type { SubscriptionOffer } from './subscription-offer.type';
|
||||||
import type { ToggleOption } from './toggle-option.type';
|
|
||||||
import type { UserWithSettings } from './user-with-settings.type';
|
import type { UserWithSettings } from './user-with-settings.type';
|
||||||
import type { ViewMode } from './view-mode.type';
|
import type { ViewMode } from './view-mode.type';
|
||||||
import type { XRayRulesSettings } from './x-ray-rules-settings.type';
|
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
AccessType,
|
AccessType,
|
||||||
@ -40,8 +38,6 @@ export type {
|
|||||||
OrderWithAccount,
|
OrderWithAccount,
|
||||||
RequestWithUser,
|
RequestWithUser,
|
||||||
SubscriptionOffer,
|
SubscriptionOffer,
|
||||||
ToggleOption,
|
|
||||||
UserWithSettings,
|
UserWithSettings,
|
||||||
ViewMode,
|
ViewMode
|
||||||
XRayRulesSettings
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user