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 4 weeks ago committed by GitHub
parent d4c5d58781
commit e05f481344
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -143,8 +143,7 @@
// 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/prefer-nullish-coalescing": "warn", // TODO: Requires strictNullChecks: true "@typescript-eslint/prefer-nullish-coalescing": "warn", // TODO: Requires strictNullChecks: true
"@typescript-eslint/consistent-indexed-object-style": "warn", "@typescript-eslint/consistent-indexed-object-style": "warn"
"@typescript-eslint/consistent-generic-constructors": "warn"
} }
} }
], ],

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### 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 `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 - 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; @ViewChild(MatSort) sort: MatSort;
public dataSource: MatTableDataSource<AccountModel> = public dataSource = new MatTableDataSource<AccountModel>();
new MatTableDataSource();
public displayedColumns = []; public displayedColumns = [];
public isLoading = true; public isLoading = true;
public routeQueryParams: Subscription; public routeQueryParams: Subscription;

@ -35,10 +35,10 @@ export class AdminJobsComponent implements OnDestroy, OnInit {
DATA_GATHERING_QUEUE_PRIORITY_HIGH; DATA_GATHERING_QUEUE_PRIORITY_HIGH;
public DATA_GATHERING_QUEUE_PRIORITY_MEDIUM = public DATA_GATHERING_QUEUE_PRIORITY_MEDIUM =
DATA_GATHERING_QUEUE_PRIORITY_MEDIUM; DATA_GATHERING_QUEUE_PRIORITY_MEDIUM;
public dataSource = new MatTableDataSource<AdminJobs['jobs'][0]>();
public defaultDateTimeFormat: string; public defaultDateTimeFormat: string;
public filterForm: FormGroup; public filterForm: FormGroup;
public dataSource: MatTableDataSource<AdminJobs['jobs'][0]> =
new MatTableDataSource();
public displayedColumns = [ public displayedColumns = [
'index', 'index',
'type', 'type',

@ -34,7 +34,7 @@ import { CreateOrUpdatePlatformDialog } from './create-or-update-platform-dialog
export class AdminPlatformComponent implements OnInit, OnDestroy { export class AdminPlatformComponent implements OnInit, OnDestroy {
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
public dataSource: MatTableDataSource<Platform> = new MatTableDataSource(); public dataSource = new MatTableDataSource<Platform>();
public deviceType: string; public deviceType: string;
public displayedColumns = ['name', 'url', 'accounts', 'actions']; public displayedColumns = ['name', 'url', 'accounts', 'actions'];
public platforms: Platform[]; public platforms: Platform[];

@ -34,7 +34,7 @@ import { CreateOrUpdateTagDialog } from './create-or-update-tag-dialog/create-or
export class AdminTagComponent implements OnInit, OnDestroy { export class AdminTagComponent implements OnInit, OnDestroy {
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
public dataSource: MatTableDataSource<Tag> = new MatTableDataSource(); public dataSource = new MatTableDataSource<Tag>();
public deviceType: string; public deviceType: string;
public displayedColumns = ['name', 'userId', 'activities', 'actions']; public displayedColumns = ['name', 'userId', 'activities', 'actions'];
public tags: Tag[]; public tags: Tag[];

@ -24,8 +24,7 @@ import { takeUntil } from 'rxjs/operators';
templateUrl: './admin-users.html' templateUrl: './admin-users.html'
}) })
export class AdminUsersComponent implements OnDestroy, OnInit { export class AdminUsersComponent implements OnDestroy, OnInit {
public dataSource: MatTableDataSource<AdminUsers['users'][0]> = public dataSource = new MatTableDataSource<AdminUsers['users'][0]>();
new MatTableDataSource();
public defaultDateFormat: string; public defaultDateFormat: string;
public displayedColumns: string[] = []; public displayedColumns: string[] = [];
public getEmojiFlag = getEmojiFlag; public getEmojiFlag = getEmojiFlag;

@ -74,9 +74,9 @@ export class GfAccountBalancesComponent
date: new FormControl(new Date(), Validators.required) date: new FormControl(new Date(), Validators.required)
}); });
public dataSource: MatTableDataSource< public dataSource = new MatTableDataSource<
AccountBalancesResponse['balances'][0] AccountBalancesResponse['balances'][0]
> = new MatTableDataSource(); >();
public displayedColumns: string[] = ['date', 'value', 'actions']; public displayedColumns: string[] = ['date', 'value', 'actions'];
public Validators = Validators; public Validators = Validators;

@ -67,8 +67,7 @@ export class GfHoldingsTableComponent implements OnChanges, OnDestroy {
@ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
public dataSource: MatTableDataSource<PortfolioPosition> = public dataSource = new MatTableDataSource<PortfolioPosition>();
new MatTableDataSource();
public displayedColumns = []; public displayedColumns = [];
public ignoreAssetSubClasses = [AssetSubClass.CASH]; public ignoreAssetSubClasses = [AssetSubClass.CASH];
public isLoading = true; public isLoading = true;

@ -46,7 +46,7 @@ export class GfTopHoldingsComponent implements OnChanges, OnDestroy {
@ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
public dataSource: MatTableDataSource<Holding> = new MatTableDataSource(); public dataSource = new MatTableDataSource<Holding>();
public displayedColumns: string[] = [ public displayedColumns: string[] = [
'name', 'name',
'valueInBaseCurrency', 'valueInBaseCurrency',

Loading…
Cancel
Save