fix "ng lint" command (#5012)

* update to latest js-api

* fix the "ng lint" command

* fix linting issues

* fix lint issues

* lint fixes

* code fixes

* fix html

* fix html

* update tests

* test fixes

* update tests

* fix tests and api

* fix code
This commit is contained in:
Denys Vuika
2019-08-29 16:35:30 +01:00
committed by Eugenio Romano
parent 140c64b79f
commit edc0945f39
162 changed files with 537 additions and 530 deletions

View File

@@ -74,12 +74,12 @@ export class ChecklistComponent implements OnChanges {
ngOnChanges(changes: SimpleChanges) {
const taskId = changes['taskId'];
if (taskId && taskId.currentValue) {
this.getTaskChecklist(taskId.currentValue);
this.getTaskChecklist();
return;
}
}
public getTaskChecklist(taskId: string) {
getTaskChecklist() {
this.checklist = [];
if (this.taskId) {
this.activitiTaskList.getTaskChecklist(this.taskId).subscribe(

View File

@@ -48,12 +48,8 @@ describe('TaskAuditDirective', () => {
download: boolean = false;
fileName: string;
format: string;
constructor() {
}
onAuditClick(event: any) {
}
onAuditClick() {}
}
let fixture: ComponentFixture<BasicButtonComponent>;

View File

@@ -18,7 +18,7 @@
/* tslint:disable:no-input-rename */
import { ContentService } from '@alfresco/adf-core';
import { Directive, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
import { Directive, EventEmitter, Input, OnChanges, Output } from '@angular/core';
import { TaskListService } from './../services/tasklist.service';
const JSON_FORMAT: string = 'json';
@@ -68,7 +68,7 @@ export class TaskAuditDirective implements OnChanges {
private taskListService: TaskListService) {
}
ngOnChanges(changes: SimpleChanges): void {
ngOnChanges(): void {
if (!this.isValidType()) {
this.setDefaultFormatType();
}

View File

@@ -151,7 +151,7 @@ describe('TaskDetailsComponent', () => {
expect(fixture.debugElement.query(By.css('adf-form'))).not.toBeNull();
}));
it('should display a form in readonly when the task has an associated form and readOnlyForm is true', async((done) => {
it('should display a form in readonly when the task has an associated form and readOnlyForm is true', async(() => {
component.readOnlyForm = true;
component.taskId = '123';
fixture.detectChanges();

View File

@@ -52,7 +52,7 @@ describe('TaskFiltersComponent', () => {
filter: { state: 'open', assignment: 'fake-assignee' }
}));
const fakeGlobalFilterPromise = new Promise(function (resolve, reject) {
const fakeGlobalFilterPromise = new Promise(function (resolve) {
resolve(fakeGlobalFilter);
});
@@ -60,7 +60,7 @@ describe('TaskFiltersComponent', () => {
message: 'invalid data'
};
const fakeGlobalEmptyFilterPromise = new Promise(function (resolve, reject) {
const fakeGlobalEmptyFilterPromise = new Promise(function (resolve) {
resolve(fakeGlobalEmptyFilter);
});
@@ -126,7 +126,7 @@ describe('TaskFiltersComponent', () => {
it('should return the filter task list, filtered By Name', (done) => {
const fakeDeployedApplicationsPromise = new Promise(function (resolve, reject) {
const fakeDeployedApplicationsPromise = new Promise(function (resolve) {
resolve({});
});

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
import {
BpmUserService,
CardViewDateItemModel,
@@ -75,7 +75,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
this.loadCurrentBpmUserId();
}
ngOnChanges(changes: SimpleChanges) {
ngOnChanges() {
this.refreshData();
}

View File

@@ -249,13 +249,13 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
reload(): void {
if (!this.hasCustomDataSource) {
this.requestNode = this.createRequestNode();
this.load(this.requestNode);
this.load();
} else {
this.isLoading = false;
}
}
private load(requestNode: TaskQueryRequestRepresentationModel) {
private load() {
this.isLoading = true;
this.loadTasksByState().subscribe(
(tasks) => {

View File

@@ -103,7 +103,7 @@ describe('Activiti Task filter Service', () => {
spyOn(service, 'callApiTaskFilters').and.returnValue((fakeAppPromise));
const appId = 1;
service.getTaskListFilters(appId).subscribe((res) => {
service.getTaskListFilters(appId).subscribe(() => {
expect(service.callApiTaskFilters).toHaveBeenCalledWith(appId);
done();
});