OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix eslint errors
Christophe Bliard91dc1bd85d94
diff --git a/frontend/src/app/core/apiv3/cache/state-cache.service.ts b/frontend/src/app/core/apiv3/cache/state-cache.service.tsindex 6e080951517..004627935a5 100644--- a/frontend/src/app/core/apiv3/cache/state-cache.service.ts+++ b/frontend/src/app/core/apiv3/cache/state-cache.service.ts@@ -155,10 +155,11 @@ export class StateCacheService<T> {observeSome(ids:string[]):Observable<T[]> {return combineLatest(ids.map(- (id) => this.observe(id).pipe(startWith(null))- )).pipe(- map((values) => values.filter((value) => !!value)),- ) as Observable<T[]>;+ (id) => this.observe(id).pipe(startWith(null)),+ ),+ ).pipe(+ map((values) => values.filter((value) => !!value)),+ ) as Observable<T[]>;}/**diff --git a/frontend/src/app/core/global_search/input/global-search-input.component.ts b/frontend/src/app/core/global_search/input/global-search-input.component.tsindex cf77f81df13..9ff3c4f7267 100644--- a/frontend/src/app/core/global_search/input/global-search-input.component.ts+++ b/frontend/src/app/core/global_search/input/global-search-input.component.ts@@ -39,7 +39,9 @@ import {ViewEncapsulation,} from '@angular/core';import { BehaviorSubject, Observable, of } from 'rxjs';-import { first, map, mergeMap, startWith, switchMap, tap } from 'rxjs/operators';+import {+ first, map, switchMap, tap,+} from 'rxjs/operators';import { GlobalSearchService } from 'core-app/core/global_search/services/global-search.service';import { isClickedWithModifier } from 'core-app/shared/helpers/link-handling/link-handling';import { Highlighting } from 'core-app/features/work-packages/components/wp-fast-table/builders/highlighting/highlighting.functions';@@ -222,7 +224,7 @@ export class GlobalSearchInputComponent implements AfterViewInit, OnDestroy {return Highlighting.inlineClass(property, id);}- public search($event:SearchResultItems):void {+ public search(_$event:SearchResultItems):void {this.currentValue = this.searchTerm;}@@ -302,13 +304,13 @@ export class GlobalSearchInputComponent implements AfterViewInit, OnDestroy {switchMap((wpIds) => {// It is needed, because otherwise we get infinite spin running// in the searchbar with no recent workpackages IDs inside localStorage- if(wpIds.length === 0) {+ if (wpIds.length === 0) {return of([]);}void this.apiV3Service.work_packages.requireAll(wpIds);return this.apiV3Service.work_packages.cache.observeSome(wpIds);- })+ }),);}diff --git a/frontend/src/app/core/recent-items.service.ts b/frontend/src/app/core/recent-items.service.tsindex a6c5de44538..63a8a2a77ab 100644--- a/frontend/src/app/core/recent-items.service.ts+++ b/frontend/src/app/core/recent-items.service.ts@@ -33,10 +33,8 @@ import { BehaviorSubject } from 'rxjs';export class RecentItemsService {recentItems$ = new BehaviorSubject(this.getAll());- add(id: string): void {- let wps = JSON- .parse(window.OpenProject.guardedLocalStorage('recent') || '[]')- .filter((entry : string) => entry !== id);+ add(id:string):void {+ let wps = this.getAll().filter((entry:string) => entry !== id);wps.unshift(id);if (wps.length > 5) {wps = wps.slice(0, 5);@@ -45,7 +43,7 @@ export class RecentItemsService {this.recentItems$.next(wps);}- getAll(): string[] {- return JSON.parse(window.OpenProject.guardedLocalStorage('recent') || '[]')+ getAll():string[] {+ return JSON.parse(window.OpenProject.guardedLocalStorage('recent') || '[]') as string[];}}diff --git a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.tsindex 3ed13b8c0f7..10398cdf415 100644--- a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts+++ b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts@@ -32,11 +32,9 @@ import {} from 'rxjs';import {debounce,- debounceTime,distinctUntilChanged,filter,switchMap,- take,tap,} from 'rxjs/operators';import { GroupValueFn } from '@ng-select/ng-select/lib/ng-select.component';@@ -218,16 +216,16 @@ export class OpAutocompleterComponent extends UntilDestroyedMixin implements OnI@ViewChild('ngSelectInstance') ngSelectInstance:NgSelectComponent;@ContentChild(OpAutocompleterOptionTemplateDirective, { read: TemplateRef })- optionTemplate:TemplateRef<any>;+ optionTemplate:TemplateRef<any>;@ContentChild(OpAutocompleterLabelTemplateDirective, { read: TemplateRef })- labelTemplate:TemplateRef<any>;+ labelTemplate:TemplateRef<any>;@ContentChild(OpAutocompleterHeaderTemplateDirective, { read: TemplateRef })- headerTemplate:TemplateRef<any>;+ headerTemplate:TemplateRef<any>;@ContentChild(OpAutocompleterFooterTemplateDirective, { read: TemplateRef })- footerTemplate:TemplateRef<any>;+ footerTemplate:TemplateRef<any>;initialDebounce = true;