Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Feature/Switch consistent-generic-constructors eslint rule from warn to error (#3985)
dw-0e05f4813447e
diff --git a/.eslintrc.json b/.eslintrc.jsonindex 259b0a9c9b..79d34dd067 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -143,8 +143,7 @@// The following rules are part of @typescript-eslint/stylistic-type-checked// and can be remove once solved"@typescript-eslint/prefer-nullish-coalescing": "warn", // TODO: Requires strictNullChecks: true- "@typescript-eslint/consistent-indexed-object-style": "warn",- "@typescript-eslint/consistent-generic-constructors": "warn"+ "@typescript-eslint/consistent-indexed-object-style": "warn"}}],diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 716b8c7d5e..e289b0983d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Changed+- Switched the `consistent-generic-constructors` rule from `warn` to `error` in the `eslint` configuration- Switched the `consistent-type-assertions` rule from `warn` to `error` in the `eslint` configuration- Switched the `prefer-optional-chain` rule from `warn` to `error` in the `eslint` configurationdiff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.ts b/apps/client/src/app/components/accounts-table/accounts-table.component.tsindex c88eabcdb6..06359e57a6 100644--- a/apps/client/src/app/components/accounts-table/accounts-table.component.ts+++ b/apps/client/src/app/components/accounts-table/accounts-table.component.ts@@ -47,8 +47,7 @@ export class AccountsTableComponent implements OnChanges, OnDestroy {@ViewChild(MatSort) sort: MatSort;- public dataSource: MatTableDataSource<AccountModel> =- new MatTableDataSource();+ public dataSource = new MatTableDataSource<AccountModel>();public displayedColumns = [];public isLoading = true;public routeQueryParams: Subscription;diff --git a/apps/client/src/app/components/admin-jobs/admin-jobs.component.ts b/apps/client/src/app/components/admin-jobs/admin-jobs.component.tsindex e828049bc3..577303d60f 100644--- a/apps/client/src/app/components/admin-jobs/admin-jobs.component.ts+++ b/apps/client/src/app/components/admin-jobs/admin-jobs.component.ts@@ -35,10 +35,10 @@ export class AdminJobsComponent implements OnDestroy, OnInit {DATA_GATHERING_QUEUE_PRIORITY_HIGH;public DATA_GATHERING_QUEUE_PRIORITY_MEDIUM =DATA_GATHERING_QUEUE_PRIORITY_MEDIUM;++ public dataSource = new MatTableDataSource<AdminJobs['jobs'][0]>();public defaultDateTimeFormat: string;public filterForm: FormGroup;- public dataSource: MatTableDataSource<AdminJobs['jobs'][0]> =- new MatTableDataSource();public displayedColumns = ['index','type',diff --git a/apps/client/src/app/components/admin-platform/admin-platform.component.ts b/apps/client/src/app/components/admin-platform/admin-platform.component.tsindex a390ae24e2..03b6fd3255 100644--- a/apps/client/src/app/components/admin-platform/admin-platform.component.ts+++ b/apps/client/src/app/components/admin-platform/admin-platform.component.ts@@ -34,7 +34,7 @@ import { CreateOrUpdatePlatformDialog } from './create-or-update-platform-dialogexport class AdminPlatformComponent implements OnInit, OnDestroy {@ViewChild(MatSort) sort: MatSort;- public dataSource: MatTableDataSource<Platform> = new MatTableDataSource();+ public dataSource = new MatTableDataSource<Platform>();public deviceType: string;public displayedColumns = ['name', 'url', 'accounts', 'actions'];public platforms: Platform[];diff --git a/apps/client/src/app/components/admin-tag/admin-tag.component.ts b/apps/client/src/app/components/admin-tag/admin-tag.component.tsindex 03eef4cc7c..b8c184b488 100644--- a/apps/client/src/app/components/admin-tag/admin-tag.component.ts+++ b/apps/client/src/app/components/admin-tag/admin-tag.component.ts@@ -34,7 +34,7 @@ import { CreateOrUpdateTagDialog } from './create-or-update-tag-dialog/create-orexport class AdminTagComponent implements OnInit, OnDestroy {@ViewChild(MatSort) sort: MatSort;- public dataSource: MatTableDataSource<Tag> = new MatTableDataSource();+ public dataSource = new MatTableDataSource<Tag>();public deviceType: string;public displayedColumns = ['name', 'userId', 'activities', 'actions'];public tags: Tag[];diff --git a/apps/client/src/app/components/admin-users/admin-users.component.ts b/apps/client/src/app/components/admin-users/admin-users.component.tsindex c5264c3b34..8675937698 100644--- a/apps/client/src/app/components/admin-users/admin-users.component.ts+++ b/apps/client/src/app/components/admin-users/admin-users.component.ts@@ -24,8 +24,7 @@ import { takeUntil } from 'rxjs/operators';templateUrl: './admin-users.html'})export class AdminUsersComponent implements OnDestroy, OnInit {- public dataSource: MatTableDataSource<AdminUsers['users'][0]> =- new MatTableDataSource();+ public dataSource = new MatTableDataSource<AdminUsers['users'][0]>();public defaultDateFormat: string;public displayedColumns: string[] = [];public getEmojiFlag = getEmojiFlag;diff --git a/libs/ui/src/lib/account-balances/account-balances.component.ts b/libs/ui/src/lib/account-balances/account-balances.component.tsindex cdacabf072..a4ef1d7a4b 100644--- a/libs/ui/src/lib/account-balances/account-balances.component.ts+++ b/libs/ui/src/lib/account-balances/account-balances.component.ts@@ -74,9 +74,9 @@ export class GfAccountBalancesComponentdate: new FormControl(new Date(), Validators.required)});- public dataSource: MatTableDataSource<+ public dataSource = new MatTableDataSource<AccountBalancesResponse['balances'][0]- > = new MatTableDataSource();+ >();public displayedColumns: string[] = ['date', 'value', 'actions'];public Validators = Validators;diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.ts b/libs/ui/src/lib/holdings-table/holdings-table.component.tsindex b140827e9f..97c6d38ec2 100644--- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts+++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts@@ -67,8 +67,7 @@ export class GfHoldingsTableComponent implements OnChanges, OnDestroy {@ViewChild(MatPaginator) paginator: MatPaginator;@ViewChild(MatSort) sort: MatSort;- public dataSource: MatTableDataSource<PortfolioPosition> =- new MatTableDataSource();+ public dataSource = new MatTableDataSource<PortfolioPosition>();public displayedColumns = [];public ignoreAssetSubClasses = [AssetSubClass.CASH];public isLoading = true;diff --git a/libs/ui/src/lib/top-holdings/top-holdings.component.ts b/libs/ui/src/lib/top-holdings/top-holdings.component.tsindex 9c4a22cfb3..0a3f0e977e 100644--- a/libs/ui/src/lib/top-holdings/top-holdings.component.ts+++ b/libs/ui/src/lib/top-holdings/top-holdings.component.ts@@ -46,7 +46,7 @@ export class GfTopHoldingsComponent implements OnChanges, OnDestroy {@ViewChild(MatPaginator) paginator: MatPaginator;@ViewChild(MatSort) sort: MatSort;- public dataSource: MatTableDataSource<Holding> = new MatTableDataSource();+ public dataSource = new MatTableDataSource<Holding>();public displayedColumns: string[] = ['name','valueInBaseCurrency',