diff --git a/.eslintrc.json b/.eslintrc.json index 259b0a9c..79d34dd0 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.md index 716b8c7d..e289b098 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` configuration diff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.ts b/apps/client/src/app/components/accounts-table/accounts-table.component.ts index c88eabcd..06359e57 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 = - new MatTableDataSource(); + public dataSource = new MatTableDataSource(); 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.ts index e828049b..577303d6 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(); public defaultDateTimeFormat: string; public filterForm: FormGroup; - public dataSource: MatTableDataSource = - 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.ts index a390ae24..03b6fd32 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-dialog export class AdminPlatformComponent implements OnInit, OnDestroy { @ViewChild(MatSort) sort: MatSort; - public dataSource: MatTableDataSource = new MatTableDataSource(); + public dataSource = new MatTableDataSource(); 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.ts index 03eef4cc..b8c184b4 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-or export class AdminTagComponent implements OnInit, OnDestroy { @ViewChild(MatSort) sort: MatSort; - public dataSource: MatTableDataSource = new MatTableDataSource(); + public dataSource = new MatTableDataSource(); 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.ts index c5264c3b..86759376 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 = - new MatTableDataSource(); + public dataSource = new MatTableDataSource(); 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.ts index cdacabf0..a4ef1d7a 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 GfAccountBalancesComponent date: 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.ts index b140827e..97c6d38e 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 = - new MatTableDataSource(); + public dataSource = new MatTableDataSource(); 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.ts index 9c4a22cf..0a3f0e97 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 = new MatTableDataSource(); + public dataSource = new MatTableDataSource(); public displayedColumns: string[] = [ 'name', 'valueInBaseCurrency',