[lint-refactor] simplify tslint and unify main tslint extension in sub folders (#4032)

* simplify tslint and unify main tslint extension  in sub folders

* remove autofix

* fix lint extension and process cloud
This commit is contained in:
Eugenio Romano
2018-11-29 15:04:12 +00:00
committed by GitHub
parent 49738ad555
commit 27b0ba897a
60 changed files with 141 additions and 497 deletions

View File

@@ -34,7 +34,7 @@ export class FormNodeViewerComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.sub = this.route.params.subscribe(params => {
this.sub = this.route.params.subscribe((params) => {
this.nodeId = params['id'];
});
}

View File

@@ -18,6 +18,7 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs';
import { Params } from '@angular/router/src/shared';
@Component({
selector: 'app-form-viewer',
@@ -34,7 +35,7 @@ export class FormViewerComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.sub = this.route.params.subscribe(params => {
this.sub = this.route.params.subscribe((params: Params) => {
this.taskId = params['id'];
});
}

View File

@@ -62,7 +62,7 @@ export class ProcessAttachmentsComponent implements OnInit, OnChanges, OnDestroy
ngOnInit() {
this.subscriptions.push(
this.uploadService.fileUploadComplete.subscribe(
value => this.onFileUploadComplete(value.data)
(value) => this.onFileUploadComplete(value.data)
)
);
}
@@ -77,7 +77,7 @@ export class ProcessAttachmentsComponent implements OnInit, OnChanges, OnDestroy
}
ngOnDestroy() {
this.subscriptions.forEach(subscription => subscription.unsubscribe());
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
this.subscriptions = [];
}

View File

@@ -185,11 +185,11 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
formRenderingService.setComponentTypeResolver('custom_stencil_01', () => CustomStencil01, true);
this.subscriptions.push(
formService.formLoaded.subscribe((e: FormEvent) => {
this.logService.log(`Form loaded: ${e.form.id}`);
formService.formLoaded.subscribe((formEvent: FormEvent) => {
this.logService.log(`Form loaded: ${formEvent.form.id}`);
}),
formService.formFieldValueChanged.subscribe((e: FormFieldEvent) => {
this.logService.log(`Field value changed. Form: ${e.form.id}, Field: ${e.field.id}, Value: ${e.field.value}`);
formService.formFieldValueChanged.subscribe((formFieldEvent: FormFieldEvent) => {
this.logService.log(`Field value changed. Form: ${formFieldEvent.form.id}, Field: ${formFieldEvent.field.id}, Value: ${formFieldEvent.field.value}`);
}),
this.preferenceService.select(UserPreferenceValues.PaginationSize).subscribe((pageSize) => {
this.paginationPageSize = pageSize;
@@ -205,7 +205,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
}
),
formService.formContentClicked.subscribe(content => {
formService.formContentClicked.subscribe((content) => {
this.showContentPreview(content);
}),
@@ -229,7 +229,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
}
this.showProcessTab = this.activeTab === this.tabs.processes;
this.showTaskTab = this.activeTab === this.tabs.tasks;
this.route.params.subscribe(params => {
this.route.params.subscribe((params) => {
const applicationId = params['appId'];
this.filterSelected = params['filterId'] ? { id: +params['filterId'] } : { index: 0 };
@@ -247,7 +247,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
}
ngOnDestroy() {
this.subscriptions.forEach(subscription => subscription.unsubscribe());
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
this.subscriptions = [];
}
@@ -460,7 +460,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
}
loadStencilScriptsInPageFromProcessService() {
this.apiService.getInstance().activiti.scriptFileApi.getControllers().then(response => {
this.apiService.getInstance().activiti.scriptFileApi.getControllers().then((response) => {
if (response) {
const stencilScript = document.createElement('script');
stencilScript.type = 'text/javascript';

View File

@@ -17,6 +17,7 @@
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Params } from '@angular/router/src/shared';
@Component({
selector: 'app-show-diagram',
@@ -30,7 +31,7 @@ export class ShowDiagramComponent {
constructor(private route: ActivatedRoute,
private router: Router) {
this.route.params.subscribe(params => {
this.route.params.subscribe((params: Params) => {
this.processDefinitionId = params['processDefinitionId'];
this.appId = params['appId'];
});

View File

@@ -16,10 +16,16 @@
*/
import { Component, Input, OnChanges, OnInit, ViewChild, OnDestroy } from '@angular/core';
import { TaskListService, TaskAttachmentListComponent, TaskDetailsModel, TaskUploadService } from '@alfresco/adf-process-services';
import {
TaskListService,
TaskAttachmentListComponent,
TaskDetailsModel,
TaskUploadService
} from '@alfresco/adf-process-services';
import { UploadService, AlfrescoApiService, AppConfigService } from '@alfresco/adf-core';
import { PreviewService } from '../../services/preview.service';
import { Subscription } from 'rxjs';
import { FileUploadCompleteEvent } from '../../../../../lib/core/events/file.event';
export function taskUploadServiceFactory(api: AlfrescoApiService, config: AppConfigService) {
return new TaskUploadService(api, config);
@@ -53,12 +59,13 @@ export class TaskAttachmentsComponent implements OnInit, OnChanges, OnDestroy {
constructor(
private uploadService: UploadService,
private activitiTaskList: TaskListService,
private preview: PreviewService) {}
private preview: PreviewService) {
}
ngOnInit() {
this.subscriptions.push(
this.uploadService.fileUploadComplete.subscribe(
value => this.onFileUploadComplete(value.data)
(fileUploadCompleteEvent: FileUploadCompleteEvent) => this.onFileUploadComplete(fileUploadCompleteEvent.data)
)
);
}
@@ -73,7 +80,7 @@ export class TaskAttachmentsComponent implements OnInit, OnChanges, OnDestroy {
}
ngOnDestroy() {
this.subscriptions.forEach(subscription => subscription.unsubscribe());
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
this.subscriptions = [];
}