fix eslint warnigs for core project (#7506)

This commit is contained in:
Denys Vuika
2022-02-17 14:35:33 +00:00
committed by GitHub
parent 5b7f255eec
commit bca5a783ab
246 changed files with 5127 additions and 5065 deletions

View File

@@ -37,7 +37,7 @@ class TestPaginatedComponent implements PaginatedComponent {
get pagination(): BehaviorSubject<PaginationModel> {
if (!this._pagination) {
const defaultPagination = <PaginationModel> {
const defaultPagination = {
maxItems: 10,
skipCount: 0,
totalItems: 0,

View File

@@ -34,7 +34,7 @@ import { takeUntil } from 'rxjs/operators';
@Component({
selector: 'adf-infinite-pagination',
host: { 'class': 'infinite-adf-pagination' },
host: { class: 'infinite-adf-pagination' },
templateUrl: './infinite-pagination.component.html',
styleUrls: ['./infinite-pagination.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
@@ -118,7 +118,7 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio
if (this._target) {
this.isLoading = true;
this._target.updatePagination(<RequestPaginationModel> this.requestPaginationModel);
this._target.updatePagination(this.requestPaginationModel);
}
}

View File

@@ -260,9 +260,9 @@ describe('PaginationComponent', () => {
it('should take pagination from the external component', () => {
const pagination: Pagination = {};
const customComponent = <PaginatedComponent> {
const customComponent = {
pagination: new BehaviorSubject<Pagination>({})
};
} as PaginatedComponent;
component.target = customComponent;
component.ngOnInit();
@@ -275,9 +275,9 @@ describe('PaginationComponent', () => {
const pagination1: Pagination = {};
const pagination2: Pagination = {};
const customComponent = <PaginatedComponent> {
const customComponent = {
pagination: new BehaviorSubject<Pagination>({})
};
} as PaginatedComponent;
component.target = customComponent;
component.ngOnInit();
@@ -290,12 +290,12 @@ describe('PaginationComponent', () => {
});
it('should send pagination event to paginated component', () => {
const customComponent = <PaginatedComponent> {
const customComponent = {
pagination: new BehaviorSubject<Pagination>({}),
updatePagination() {},
updatePagination: () => {},
supportedPageSizes: [],
rows: []
};
} as PaginatedComponent;
spyOn(customComponent, 'updatePagination').and.stub();
component.target = customComponent;
@@ -310,11 +310,11 @@ describe('PaginationComponent', () => {
});
it('should go to previous page if current page has 0 items', () => {
const customComponent = <PaginatedComponent> {
updatePagination() {},
const customComponent = {
updatePagination: () => {},
pagination: new BehaviorSubject<Pagination>({}),
rows: []
};
} as PaginatedComponent;
component.target = customComponent;
component.ngOnInit();
@@ -338,9 +338,9 @@ describe('PaginationComponent', () => {
it('should not show pagination when external component count is zero', () => {
const pagination: Pagination = {};
const customComponent = <PaginatedComponent> {
const customComponent = {
pagination: new BehaviorSubject<Pagination>({ count: 0, maxItems: 5, totalItems: 5 })
};
} as PaginatedComponent;
component.target = customComponent;
component.ngOnInit();
customComponent.pagination.next(pagination);