Browse Source
Feature/Switch consistent-generic-constructors eslint rule from warn to error (#3985)
* Switch consistent-generic-constructors eslint rule from warn to error
* Update changelog
---------
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
pull/3986/head
dw-0
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with
12 additions and
15 deletions
-
.eslintrc.json
-
CHANGELOG.md
-
apps/client/src/app/components/accounts-table/accounts-table.component.ts
-
apps/client/src/app/components/admin-jobs/admin-jobs.component.ts
-
apps/client/src/app/components/admin-platform/admin-platform.component.ts
-
apps/client/src/app/components/admin-tag/admin-tag.component.ts
-
apps/client/src/app/components/admin-users/admin-users.component.ts
-
libs/ui/src/lib/account-balances/account-balances.component.ts
-
libs/ui/src/lib/holdings-table/holdings-table.component.ts
-
libs/ui/src/lib/top-holdings/top-holdings.component.ts
|
|
@ -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" |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
|
|
@ -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 |
|
|
|
|
|
|
|
|
|
@ -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; |
|
|
|
|
|
@ -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', |
|
|
|
|
|
@ -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<Platform> = new MatTableDataSource(); |
|
|
|
public dataSource = new MatTableDataSource<Platform>(); |
|
|
|
public deviceType: string; |
|
|
|
public displayedColumns = ['name', 'url', 'accounts', 'actions']; |
|
|
|
public platforms: Platform[]; |
|
|
|
|
|
@ -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<Tag> = new MatTableDataSource(); |
|
|
|
public dataSource = new MatTableDataSource<Tag>(); |
|
|
|
public deviceType: string; |
|
|
|
public displayedColumns = ['name', 'userId', 'activities', 'actions']; |
|
|
|
public tags: Tag[]; |
|
|
|
|
|
@ -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; |
|
|
|
|
|
@ -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; |
|
|
|
|
|
@ -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; |
|
|
|
|
|
@ -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', |
|
|
|