From 1ab7d6bbad76ab82ce3582101d60cecb5494122b Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Wed, 29 Sep 2021 10:24:36 +0300 Subject: [PATCH] lint fix --- src/lib/filtering/models/nested-filter.ts | 3 ++- src/lib/listing/workflow/workflow.component.ts | 2 +- src/lib/utils/headers-configuration.ts | 3 ++- src/lib/utils/http-encoder.ts | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/filtering/models/nested-filter.ts b/src/lib/filtering/models/nested-filter.ts index ff40d3f..56b6b8a 100644 --- a/src/lib/filtering/models/nested-filter.ts +++ b/src/lib/filtering/models/nested-filter.ts @@ -1,5 +1,6 @@ +import { IListable } from '../../listing/models/listable'; import { Filter } from './filter'; -import { IListable, INestedFilter } from '@iqser/common-ui'; +import { INestedFilter } from './nested-filter.model'; export class NestedFilter extends Filter implements INestedFilter, IListable { expanded: boolean; diff --git a/src/lib/listing/workflow/workflow.component.ts b/src/lib/listing/workflow/workflow.component.ts index f4d4985..14ea829 100644 --- a/src/lib/listing/workflow/workflow.component.ts +++ b/src/lib/listing/workflow/workflow.component.ts @@ -15,7 +15,7 @@ import { ListingComponent } from '../listing-component.directive'; import { CdkDrag, CdkDragDrop, CdkDropList } from '@angular/cdk/drag-drop'; import { Required } from '../../utils'; import { LoadingService } from '../../loading'; -import { IListable } from '../models'; +import {IListable} from "../models"; interface WorkflowColumn { key: K; diff --git a/src/lib/utils/headers-configuration.ts b/src/lib/utils/headers-configuration.ts index ca95a51..f3631f7 100644 --- a/src/lib/utils/headers-configuration.ts +++ b/src/lib/utils/headers-configuration.ts @@ -1,5 +1,5 @@ import { HttpHeaders } from '@angular/common/http'; -import { HeaderOptions } from '@iqser/common-ui'; +import { HeaderOptions } from '../services/generic.service'; export class HeadersConfiguration { static getHeaders(options?: HeaderOptions): HttpHeaders { @@ -71,6 +71,7 @@ export class HeadersConfiguration { * @return True if the given MIME is JSON, false otherwise. */ static isJsonMime(mime: string): boolean { + // eslint-disable-next-line no-control-regex const jsonMime = new RegExp('^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } diff --git a/src/lib/utils/http-encoder.ts b/src/lib/utils/http-encoder.ts index 17a753b..3e8c0a3 100644 --- a/src/lib/utils/http-encoder.ts +++ b/src/lib/utils/http-encoder.ts @@ -7,12 +7,12 @@ import { HttpUrlEncodingCodec } from "@angular/common/http"; */ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { - k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + const kk = super.encodeKey(k); + return kk.replace(/\+/gi, '%2B'); } encodeValue(v: string): string { - v = super.encodeValue(v); - return v.replace(/\+/gi, '%2B'); + const vv = super.encodeValue(v); + return vv.replace(/\+/gi, '%2B'); } }