[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

@@ -1,6 +1,6 @@
/*!
* @license
* Copyright 2018 Alfresco Software, Ltd.
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ export class AuthBearerInterceptor implements HttpInterceptor {
private loadExcludedUrlsRegex(): void {
const excludedUrls: string[] = this.authService.getBearerExcludedUrls();
this.excludedUrlsRegex = excludedUrls.map(urlPattern => new RegExp(urlPattern, 'gi')) || [];
this.excludedUrlsRegex = excludedUrls.map((urlPattern) => new RegExp(urlPattern, 'gi')) || [];
}
@@ -51,11 +51,11 @@ export class AuthBearerInterceptor implements HttpInterceptor {
}
const urlRequest = req.url;
const shallPass: boolean = !!this.excludedUrlsRegex.find(regex => regex.test(urlRequest));
const shallPass: boolean = !!this.excludedUrlsRegex.find((regex) => regex.test(urlRequest));
if (shallPass) {
return next.handle(req)
.pipe(
catchError(error => {
catchError((error) => {
return observableThrowError(error);
})
);
@@ -63,11 +63,11 @@ export class AuthBearerInterceptor implements HttpInterceptor {
return this.authService.addTokenToHeader(req.headers)
.pipe(
mergeMap(headersWithBearer => {
mergeMap((headersWithBearer) => {
const kcReq = req.clone({ headers: headersWithBearer });
return next.handle(kcReq)
.pipe(
catchError(error => {
catchError((error) => {
return observableThrowError(error);
})
);

View File

@@ -56,9 +56,9 @@ export class InMemoryFormService extends FormService {
// return super.getRestFieldValues(taskId, fieldId);
this.logService.log(`getRestFieldValues: ${taskId} => ${field}`);
return new Observable<FormFieldOption[]>(observer => {
return new Observable<FormFieldOption[]>((observer) => {
const currentField = this.data.rest.fields.find(
f => f.taskId === taskId && f.fieldId === field
(f) => f.taskId === taskId && f.fieldId === field
);
if ( currentField ) {
const values: FormFieldOption[] = currentField.values || [];
@@ -91,9 +91,9 @@ export class InMemoryFormService extends FormService {
// return super.getRestFieldValuesByProcessId(processDefinitionId, fieldId);
this.logService.log(`getRestFieldValuesByProcessId: ${processDefinitionId} => ${fieldId}`);
return new Observable<FormFieldOption[]>(observer => {
return new Observable<FormFieldOption[]>((observer) => {
const field = this.data.rest.fields.find(
f => f.processId === processDefinitionId && f.fieldId === fieldId
(currentField) => currentField.processId === processDefinitionId && currentField.fieldId === fieldId
);
const values: FormFieldOption[] = field.values || [];
this.logService.log(values);

View File

@@ -1,6 +1,6 @@
/*!
* @license
* Copyright 2018 Alfresco Software, Ltd.
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.