[AAE-7100] ESLint support for ADF Core and DemoShell projects (#7481)

* remove tsconfig.base as per eslint schematics

* add schematics

* upgrade demoshell to eslint

* fix eslint issues for demoshell

* integrate eslint for ADF core and fix some issues

* turn into warn

* fix code

* workaround for Chrome clipboard issue

* exclude e2e tests

* exclude e2e
This commit is contained in:
Denys Vuika
2022-02-02 18:01:47 +00:00
committed by GitHub
parent 6ef4838688
commit b8bb234410
192 changed files with 2553 additions and 483 deletions

View File

@@ -15,8 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:no-input-rename */
/* tslint:disable:rxjs-no-subject-value */
/* eslint-disable @angular-eslint/no-input-rename */
/* eslint-disable rxjs/no-subject-value */
import {
ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter,

View File

@@ -30,23 +30,23 @@ export type PaginationAction =
| 'CHANGE_PAGE_SIZE'
| 'CHANGE_PAGE_NUMBER';
export const DEFAULT_PAGINATION: PaginationModel = {
skipCount: 0,
maxItems: 25,
totalItems: 0,
count: 0,
hasMoreItems: false
};
@Component({
selector: 'adf-pagination',
host: { 'class': 'adf-pagination' },
host: { class: 'adf-pagination' },
templateUrl: './pagination.component.html',
styleUrls: ['./pagination.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None
})
export class PaginationComponent implements OnInit, OnDestroy, PaginationComponentInterface {
static DEFAULT_PAGINATION: PaginationModel = {
skipCount: 0,
maxItems: 25,
totalItems: 0,
count: 0,
hasMoreItems: false
};
private _pagination: PaginationModel;
private _isEmpty = true;
private _hasItems = false;
@@ -66,7 +66,7 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone
/** Pagination object. */
@Input()
set pagination(value: PaginationModel) {
value = value || PaginationComponent.DEFAULT_PAGINATION;
value = value || DEFAULT_PAGINATION;
this._pagination = value;
this._hasItems = value && value.count > 0;
@@ -83,6 +83,7 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone
}
/** Emitted when pagination changes in any way. */
// eslint-disable-next-line @angular-eslint/no-output-native
@Output()
change = new EventEmitter<PaginationModel>();
@@ -118,7 +119,7 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone
.pipe(takeUntil(this.onDestroy$))
.subscribe(maxItems => {
this.pagination = {
...PaginationComponent.DEFAULT_PAGINATION,
...DEFAULT_PAGINATION,
...this.pagination,
maxItems
};
@@ -144,7 +145,7 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone
if (!this.pagination) {
this.pagination = {
...PaginationComponent.DEFAULT_PAGINATION
...DEFAULT_PAGINATION
};
}
}