[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

@@ -23,15 +23,14 @@ import { CloudLayoutService } from './services/cloud-layout.service';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
const ACTION_SAVE_AS = 'saveAs';
const ACTION_DELETE = 'delete';
const TASK_FILTER_PROPERTY_KEYS = 'adf-edit-task-filter';
@Component({
templateUrl: './tasks-cloud-demo.component.html'
})
export class TasksCloudDemoComponent implements OnInit, OnDestroy {
public static ACTION_SAVE_AS = 'saveAs';
public static ACTION_DELETE = 'delete';
static TASK_FILTER_PROPERTY_KEYS = 'adf-edit-task-filter';
@ViewChild('taskCloud')
taskCloud: TaskListCloudComponent;
@@ -51,8 +50,8 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
actionMenu: boolean;
contextMenu: boolean;
actions: any[] = [];
selectedAction: { id: number, name: string, actionType: string};
selectedContextAction: { id: number, name: string, actionType: string};
selectedAction: { id: number; name: string; actionType: string};
selectedContextAction: { id: number; name: string; actionType: string};
testingMode: boolean;
selectionMode: string;
taskDetailsRedirection: boolean;
@@ -67,7 +66,7 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
private userPreference: UserPreferencesService,
private appConfig: AppConfigService) {
const properties = this.appConfig.get<Array<any>>(TasksCloudDemoComponent.TASK_FILTER_PROPERTY_KEYS);
const properties = this.appConfig.get<Array<any>>(TASK_FILTER_PROPERTY_KEYS);
if (properties) {
this.taskFilterProperties = properties;
}
@@ -134,13 +133,13 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
onTaskFilterAction(filterAction: any) {
if (filterAction.actionType === TasksCloudDemoComponent.ACTION_DELETE) {
if (filterAction.actionType === ACTION_DELETE) {
this.cloudLayoutService.setCurrentTaskFilterParam({ index: 0 });
} else {
this.cloudLayoutService.setCurrentTaskFilterParam({ id: filterAction.filter.id });
}
if (filterAction.actionType === TasksCloudDemoComponent.ACTION_SAVE_AS) {
if (filterAction.actionType === ACTION_SAVE_AS) {
this.router.navigate([`/cloud/${this.appName}/tasks/`], { queryParams: filterAction.filter });
}
}
@@ -150,14 +149,12 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
}
onShowRowContextMenu(event: DataCellEvent) {
event.value.actions = this.actions.map((action) => {
return {
event.value.actions = this.actions.map((action) => ({
data: event.value.row['obj'],
model: action,
subject: this.performAction$
};
});
}));
}
onExecuteRowAction(row: any) {