Skip to content

Commit

Permalink
Linter warning cleanup (part 2) (#3546)
Browse files Browse the repository at this point in the history
  • Loading branch information
reiterl authored Apr 15, 2024
1 parent e2bc543 commit 26223d8
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class ParticipantCreateWizardComponent extends BaseMeetingComponent imple
};

public get randomPasswordFn(): (() => string) | null {
return this._accountId ? null : () => this.repo.getRandomPassword();
return this._accountId ? null : (): string => this.repo.getRandomPassword();
}

public get isAllowedFn(): (permission: string) => boolean {
Expand Down Expand Up @@ -142,7 +142,7 @@ export class ParticipantCreateWizardComponent extends BaseMeetingComponent imple

public flickerSubject = new BehaviorSubject<boolean>(false);

public sortFn = (groupA: ViewGroup, groupB: ViewGroup) => groupA.weight - groupB.weight;
public sortFn = (groupA: ViewGroup, groupB: ViewGroup): number => groupA.weight - groupB.weight;

private readonly _currentStepIndexSubject = new BehaviorSubject<number>(0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ export class ParticipantListFilterService extends BaseMeetingFilterListService<V
return [
{
property: `isVoteWeightOne`,
shouldHideFn: () => {
shouldHideFn: (): boolean => {
return !this._voteWeightEnabled;
}
},
{
property: `delegationType`,
shouldHideFn: () => {
shouldHideFn: (): boolean => {
return !this._voteDelegationEnabled;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ViewProjection extends BaseProjectableViewModel<Projection> {
return this.content_object.getProjectorTitle(this.getModel());
}

public override getTitle = () => this.getProjectorTitle().title;
public override getTitle = (): string => this.getProjectorTitle().title;

public getSubtitle(): string {
return this.getProjectorTitle().subtitle || ``;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class AccountSearchSelectorComponent extends BaseSearchSelectorComponent
permissionRelatedId: ORGANIZATION_ID,
permissionScope: UserScope.ORGANIZATION
})[0];
const getTitle = (user: Partial<User>) => `${user.first_name ?? ``} ${user.last_name ?? ``}`;
const getTitle = (user: Partial<User>): string => `${user.first_name ?? ``} ${user.last_name ?? ``}`;
this.filteredItemsSubject.next(
result.map(entry => ({
id: entry.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ export class AccountAddToMeetingsComponent extends BaseUiComponent implements On

private userId: Id | null = null;

public getMeetingAdditionalInfoFn = (item: ViewMeeting) =>
public getMeetingAdditionalInfoFn = (item: ViewMeeting): string =>
item.committee?.getTitle()?.trim() === item.getTitle()?.trim() ? `` : `(${item.committee?.getTitle()})`;

public getMeetingAdditionallySearchedFn = (item: ViewMeeting) => [item.committee.getTitle()];
public getMeetingAdditionallySearchedFn = (item: ViewMeeting): [string] => [item.committee.getTitle()];

public constructor(
private operator: OperatorService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class AccountDetailComponent extends BaseComponent implements OnInit {
return Object.values(this._tableData).filter(row => row[`is_manager`] === true).length;
}

public tableDataAscOrderCompare = <T>(a: KeyValue<string, T>, b: KeyValue<string, T>) => {
public tableDataAscOrderCompare = <T>(a: KeyValue<string, T>, b: KeyValue<string, T>): number => {
const aName = a.value[`committee_name`] ?? a.value[`meeting_name`] ?? ``;
const bName = b.value[`committee_name`] ?? b.value[`meeting_name`] ?? ``;
return aName.localeCompare(bName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export class OrganizationMediafileListComponent
*/
public fileEditForm: UntypedFormGroup | null = null;

public isUsedAsLogoFn = (file: ViewMediafile) => this.isUsedAs(file);
public isUsedAsFontFn = (_file: ViewMediafile) => false;
public isUsedAsLogoFn = (file: ViewMediafile): boolean => this.isUsedAs(file);
public isUsedAsFontFn = (_file: ViewMediafile): boolean => false;

private folderSubscription: Subscription | null = null;
private directorySubscription: Subscription | null = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class OverlayService {
const componentRef = this.domService.attachComponent(OverlayComponent);
const _config = {
...config,
onCloseFn: () => {
onCloseFn: (): void => {
config.onCloseFn?.();
this.domService.dispose(componentRef);
}
Expand Down

0 comments on commit 26223d8

Please sign in to comment.