mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -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);
|
||||
})
|
||||
);
|
||||
|
@@ -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);
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user