Skip to content

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

fixed eslint issues

Jonas Jabaridfb3635e8e59
diff --git a/frontend/src/app/features/overview/overview.component.ts b/frontend/src/app/features/overview/overview.component.ts
index ddd9d5d461c..9746c96c12a 100644
--- a/frontend/src/app/features/overview/overview.component.ts
+++ b/frontend/src/app/features/overview/overview.component.ts
@@ -14,18 +14,18 @@ export class OverviewComponent extends GridPageComponent {
}
protected isTurboFrameSidebarEnabled():boolean {
- return true
+ return true;
}
protected turboFrameSidebarSrc():string {
- return `${this.pathHelper.staticBase}/projects/${this.currentProject.identifier!}/project_custom_fields_sidebar`;
+ return `${this.pathHelper.staticBase}/projects/${this.currentProject.identifier ?? ''}/project_custom_fields_sidebar`;
}
protected turboFrameSidebarId():string {
- return "project-custom-fields-sidebar";
+ return 'project-custom-fields-sidebar';
}
protected gridScopePath():string {
- return this.pathHelper.projectPath(this.currentProject.identifier!);
+ return this.pathHelper.projectPath(this.currentProject.identifier ?? '');
}
}
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.ts
index 705dfd744d5..2973248a39f 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
@@ -106,7 +106,7 @@ export class OpAutocompleterComponent<T extends IAutocompleteItem = IAutocomplet
@Input() public inputValue?:string|string[];
- @Input() public multipleAsSeparateInputs:boolean = true;
+ @Input() public multipleAsSeparateInputs = true;
@Input() public inputBindValue = 'id';
@@ -143,7 +143,7 @@ export class OpAutocompleterComponent<T extends IAutocompleteItem = IAutocomplet
@Input() public classes?:string;
- @Input() public multiple:boolean = false;
+ @Input() public multiple = false;
@Input() public openDirectly?:boolean = false;
diff --git a/frontend/src/app/shared/components/grids/grid/page/grid-page.component.ts b/frontend/src/app/shared/components/grids/grid/page/grid-page.component.ts
index 912cf8fa278..a56368d46d9 100644
--- a/frontend/src/app/shared/components/grids/grid/page/grid-page.component.ts
+++ b/frontend/src/app/shared/components/grids/grid/page/grid-page.component.ts
@@ -18,7 +18,8 @@ export abstract class GridPageComponent implements OnInit, OnDestroy {
html_title: this.i18n.t(`js.${this.i18nNamespace()}.label`),
};
- constructor(readonly gridInitialization:GridInitializationService,
+ constructor(
+ readonly gridInitialization:GridInitializationService,
// not used in the base class but will be used throughout the subclasses
readonly pathHelper:PathHelperService,
readonly currentProject:CurrentProjectService,
@@ -28,8 +29,9 @@ export abstract class GridPageComponent implements OnInit, OnDestroy {
readonly addWidget:GridAddWidgetService,
readonly renderer:Renderer2,
readonly areas:GridAreaService,
- readonly configurationService:ConfigurationService) {}
-
+ readonly configurationService:ConfigurationService,
+ ) {}
+
public grid:GridResource;
protected isTurboFrameSidebarEnabled():boolean {
diff --git a/frontend/src/stimulus/controllers/dynamic/projects/settings/project-custom-fields-mapping-filter.controller.ts b/frontend/src/stimulus/controllers/dynamic/projects/settings/project-custom-fields-mapping-filter.controller.ts
index 5f041521030..2f6fbc28328 100644
--- a/frontend/src/stimulus/controllers/dynamic/projects/settings/project-custom-fields-mapping-filter.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/projects/settings/project-custom-fields-mapping-filter.controller.ts
@@ -34,26 +34,26 @@ export default class ProjectCustomFieldsMappingFilterController extends Controll
static targets = [
'filter',
'searchItem',
- 'bulkActionContainer'
+ 'bulkActionContainer',
];
declare readonly filterTarget:HTMLInputElement;
declare readonly searchItemTargets:HTMLInputElement[];
declare readonly bulkActionContainerTargets:HTMLInputElement[];
- connect(): void {
+ connect():void {
this.element.querySelector('#project-custom-fields-mapping-filter-clear-button')?.addEventListener('click', () => {
this.resetFilterViaClearButton();
});
}
- disconnect(): void {
+ disconnect():void {
this.element.querySelector('#project-custom-fields-mapping-filter-clear-button')?.removeEventListener('click', () => {
this.resetFilterViaClearButton();
});
}
- filterLists(event: Event) {
+ filterLists() {
const query = this.filterTarget.value.toLowerCase();
if (query.length > 0) {
@@ -63,12 +63,12 @@ export default class ProjectCustomFieldsMappingFilterController extends Controll
}
this.searchItemTargets.forEach((item) => {
- const text = item.textContent!.toLowerCase();
+ const text = item.textContent?.toLowerCase();
- if (text.includes(query)) {
- (item as HTMLElement).style.display = "block";
+ if (text?.includes(query)) {
+ (item as HTMLElement).style.display = 'block';
} else {
- (item as HTMLElement).style.display = "none";
+ (item as HTMLElement).style.display = 'none';
}
});
}
@@ -77,19 +77,19 @@ export default class ProjectCustomFieldsMappingFilterController extends Controll
this.showBulkActionContainers();
this.searchItemTargets.forEach((item) => {
- (item as HTMLElement).style.display = "block";
+ (item as HTMLElement).style.display = 'block';
});
}
hideBulkActionContainers() {
this.bulkActionContainerTargets.forEach((item) => {
- (item as HTMLElement).style.display = "none";
+ (item as HTMLElement).style.display = 'none';
});
}
showBulkActionContainers() {
this.bulkActionContainerTargets.forEach((item) => {
- (item as HTMLElement).style.display = "block";
+ (item as HTMLElement).style.display = 'block';
});
}
}