Skip to content

Commit

Permalink
chore: Reinstate trailing comma eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Wiraszka committed Jul 3, 2024
1 parent 383cbfe commit 7347b38
Show file tree
Hide file tree
Showing 91 changed files with 498 additions and 496 deletions.
16 changes: 8 additions & 8 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const routes: Routes = [
path: NavPathTypes.MEMBERS,
loadChildren: () =>
import('./screens/members/members-screen.module').then(
(m) => m.MembersScreenModule
(m) => m.MembersScreenModule,
),
},
{
Expand All @@ -32,7 +32,7 @@ const routes: Routes = [
path: NavPathTypes.SCHEDULE,
loadChildren: () =>
import('./screens/schedule/schedule-screen.module').then(
(m) => m.ScheduleScreenModule
(m) => m.ScheduleScreenModule,
),
},
{
Expand All @@ -50,35 +50,35 @@ const routes: Routes = [
path: NavPathTypes.ARTICLE,
loadChildren: () =>
import('./screens/article/article-screen.module').then(
(m) => m.ArticleScreenModule
(m) => m.ArticleScreenModule,
),
},
{
path: NavPathTypes.CITY_CHAMPION,
loadChildren: () =>
import('./screens/champion/champion-screen.module').then(
(m) => m.ChampionScreenModule
(m) => m.ChampionScreenModule,
),
},
{
path: NavPathTypes.PHOTO_GALLERY,
loadChildren: () =>
import('./screens/photo-gallery/photo-gallery-screen.module').then(
(m) => m.PhotoGalleryScreenModule
(m) => m.PhotoGalleryScreenModule,
),
},
{
path: NavPathTypes.GAME_ARCHIVES,
loadChildren: () =>
import('./screens/game-archives/game-archives-screen.module').then(
(m) => m.GameArchivesScreenModule
(m) => m.GameArchivesScreenModule,
),
},
{
path: NavPathTypes.DOCUMENTS,
loadChildren: () =>
import('./screens/documents/documents-screen.module').then(
(m) => m.DocumentsScreenModule
(m) => m.DocumentsScreenModule,
),
},
{
Expand All @@ -94,7 +94,7 @@ const routes: Routes = [
path: NavPathTypes.CHANGE_PASSWORD,
loadChildren: () =>
import('./screens/change-password/change-password-screen.module').then(
(m) => m.ChangePasswordScreenModule
(m) => m.ChangePasswordScreenModule,
),
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class AppComponent implements OnInit {
constructor(
private changeDetectionRef: ChangeDetectorRef,
private loaderService: LoaderService,
public facade: AppFacade
public facade: AppFacade,
) {
moment.tz.setDefault('America/Toronto');
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export class AppFacade {
showModal$ = this.store.select(ModalSelectors.isOpen);
showToaster$ = this.store.select(ToasterSelectors.isDisplayingToasts);
showUpcomingEventBanner$ = this.store.select(
UserSettingsSelectors.showUpcomingEventBanner
UserSettingsSelectors.showUpcomingEventBanner,
);
upcomingEvent$ = this.store.select(ScheduleSelectors.upcomingEvent);

constructor(
@Inject(DOCUMENT) private document: Document,
private readonly store: Store
private readonly store: Store,
) {
this.isDarkMode$.pipe(untilDestroyed(this)).subscribe((isDarkMode) => {
this.document.body.setAttribute('data-theme', isDarkMode ? 'dark' : 'light');
Expand Down
8 changes: 2 additions & 6 deletions src/app/components/article-form/article-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import { isDefined } from '@app/utils';
import { imageSizeValidator } from '@app/validators';
import { debounceTime, filter, first } from 'rxjs/operators';





import { ArticleFormFacade } from './article-form.facade';

@UntilDestroy()
Expand All @@ -29,7 +25,7 @@ export class ArticleFormComponent implements OnInit {
constructor(
public facade: ArticleFormFacade,
private formBuilder: FormBuilder,
private imagesService: ImagesService
private imagesService: ImagesService,
) {}

ngOnInit(): void {
Expand Down Expand Up @@ -118,7 +114,7 @@ export class ArticleFormComponent implements OnInit {
imageFile: article.imageFile,
imageUrl: article.imageUrl,
},
{ emitEvent: false }
{ emitEvent: false },
);
});
}
Expand Down
10 changes: 5 additions & 5 deletions src/app/components/article-form/article-form.facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { type Article } from '@app/types';
export class ArticleFormFacade {
readonly articleCurrently$ = this.store.select(ArticlesSelectors.articleCurrently);
readonly articleImageCurrently$ = this.store.select(
ArticlesSelectors.articleImageCurrently
ArticlesSelectors.articleImageCurrently,
);
readonly hasUnsavedChanges$ = this.store.select(ArticlesSelectors.hasUnsavedChanges);
readonly isEditMode$ = this.store.select(ArticlesSelectors.isEditMode);
Expand All @@ -35,15 +35,15 @@ export class ArticleFormFacade {
? this.store.dispatch(
ArticlesActions.updateArticleSelected({
article,
})
}),
)
: this.store.dispatch(
ArticlesActions.publishArticleSelected({
article,
})
)
}),
),
),
first()
first(),
)
.subscribe();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class ChangePasswordFormComponent implements OnInit {

constructor(
public facade: ChangePasswordFormFacade,
private formBuilder: FormBuilder
private formBuilder: FormBuilder,
) {}

ngOnInit(): void {
Expand Down Expand Up @@ -124,7 +124,7 @@ export class ChangePasswordFormComponent implements OnInit {
this.facade.tempInitialPassword$
.pipe(untilDestroyed(this))
.subscribe(
(tempInitialPassword) => (this.tempInitialPassword = tempInitialPassword)
(tempInitialPassword) => (this.tempInitialPassword = tempInitialPassword),
);

this.facade.user$.pipe(untilDestroyed(this)).subscribe((user) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export class ChangePasswordFormFacade {
this.store.dispatch(AuthActions.passwordChangeRequested({ request }));
} else {
this.store.dispatch(
AuthActions.codeForPasswordChangeRequested({ email: formData.email })
AuthActions.codeForPasswordChangeRequested({ email: formData.email }),
);
}
}),
first()
first(),
)
.subscribe();
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/club-map/club-map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ClubMapComponent implements OnInit {
});
})
.catch((error) =>
console.error(`[LCC] Error creating Google Maps advanced marker: ${error}`)
console.error(`[LCC] Error creating Google Maps advanced marker: ${error}`),
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/dropdown/dropdown.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class DropdownDirective {

constructor(
@Inject(DOCUMENT) private _document: Document,
private elementRef: ElementRef
private elementRef: ElementRef,
) {}

@HostListener('document:click', ['$event', '$event.target'])
Expand All @@ -38,7 +38,7 @@ export class DropdownDirective {
?.contains(targetElement);

const clickedOnDropdownLink = Array.from(
this._document.querySelectorAll('.lcc-dropdown .lcc-dropdown-link')
this._document.querySelectorAll('.lcc-dropdown .lcc-dropdown-link'),
).some((element) => element?.contains(targetElement));

const clickedOutside = !this.dropdownElement.contains(targetElement);
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/event-form/event-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class EventFormComponent implements OnInit {

constructor(
public facade: EventFormFacade,
private formBuilder: FormBuilder
private formBuilder: FormBuilder,
) {}

ngOnInit(): void {
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/event-form/event-form.facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export class EventFormFacade {
? this.store.dispatch(
ScheduleActions.updateEventSelected({
event,
})
}),
)
: this.store.dispatch(ScheduleActions.addEventSelected({ event }))
: this.store.dispatch(ScheduleActions.addEventSelected({ event })),
),
first()
first(),
)
.subscribe();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ImageOverlayComponent implements OnInit, OnDestroy {
public facade: ImageOverlayFacade,
private loaderService: LoaderService,
private renderer: Renderer2,
@Inject(DOCUMENT) private _document: Document
@Inject(DOCUMENT) private _document: Document,
) {}

ngOnInit(): void {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/login-form/login-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class LoginFormComponent implements OnInit {

constructor(
public facade: LoginFormFacade,
private formBuilder: FormBuilder
private formBuilder: FormBuilder,
) {}

ngOnInit(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class MarkdownRendererComponent implements OnInit, AfterViewChecked {
constructor(
private router: Router,
@Inject(DOCUMENT)
private _document: Document
private _document: Document,
) {}

ngOnInit(): void {
Expand Down Expand Up @@ -50,7 +50,7 @@ export class MarkdownRendererComponent implements OnInit, AfterViewChecked {

private addArticleAnchorIds(): void {
const headerElements = this._document.querySelectorAll(
'markdown h1, markdown h2, markdown h3, markdown h4, markdown h5, markdown h6'
'markdown h1, markdown h2, markdown h3, markdown h4, markdown h5, markdown h6',
);

if (headerElements) {
Expand All @@ -68,14 +68,14 @@ export class MarkdownRendererComponent implements OnInit, AfterViewChecked {
this.router.events
.pipe(
filter((event) => event instanceof Scroll),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe((event) => this.scrollToAnchor((event as Scroll).anchor!));
}

private scrollToAnchor(anchorToScrollTo?: string): void {
const elementToScrollTo = this._document.getElementById(
anchorToScrollTo ?? 'app-container'
anchorToScrollTo ?? 'app-container',
);

if (elementToScrollTo) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/member-form/member-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class MemberFormComponent implements OnInit {

constructor(
public facade: MemberFormFacade,
private formBuilder: FormBuilder
private formBuilder: FormBuilder,
) {}

ngOnInit(): void {
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/member-form/member-form.facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export class MemberFormFacade {
? this.store.dispatch(
MembersActions.updateMemberSelected({
member,
})
}),
)
: this.store.dispatch(MembersActions.addMemberSelected({ member }))
: this.store.dispatch(MembersActions.addMemberSelected({ member })),
),
first()
first(),
)
.subscribe();
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/modal/modal.facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ModalFacade {
// TODO: Hook up for all other 'cancel' action types
onClose(): void {
this.store.dispatch(
ModalActions.selectionMade({ action: ModalButtonActionTypes.LEAVE_CANCEL })
ModalActions.selectionMade({ action: ModalButtonActionTypes.LEAVE_CANCEL }),
);
}
}
2 changes: 1 addition & 1 deletion src/app/components/schedule/schedule.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class ScheduleComponent implements OnInit {
this.facade.events$
.pipe(
untilDestroyed(this),
combineLatestWith(this.facade.upcomingEvents$, this.facade.showPastEvents$)
combineLatestWith(this.facade.upcomingEvents$, this.facade.showPastEvents$),
)
.subscribe(([allEvents, upcomingEvents, showPastEvents]) => {
this.shownEvents =
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/tooltip/tooltip.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class TooltipDirective implements OnChanges, OnDestroy {

constructor(
private elementRef: ElementRef,
private viewContainerRef: ViewContainerRef
private viewContainerRef: ViewContainerRef,
) {}

@HostListener('mouseenter')
Expand Down Expand Up @@ -87,7 +87,7 @@ export class TooltipDirective implements OnChanges, OnDestroy {

const tooltipTextWidth = getTextWidth(
this.tooltip,
this.TOOLTIP_MAX_WIDTH_PX - this.TOOLTIP_SIDE_PADDING_PX
this.TOOLTIP_MAX_WIDTH_PX - this.TOOLTIP_SIDE_PADDING_PX,
);

const rightOverflow =
Expand Down
4 changes: 2 additions & 2 deletions src/app/guards/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { NavPathTypes } from '@app/types';
export class AuthGuard {
constructor(
private readonly router: Router,
private readonly store: Store
private readonly store: Store,
) {}

canActivate(): Observable<boolean> {
Expand Down Expand Up @@ -45,7 +45,7 @@ export class AuthGuard {

this.router.navigate([redirectPath]);
return false;
})
}),
);
}
}
4 changes: 2 additions & 2 deletions src/app/guards/unsaved-article.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export class UnsavedArticleGuard {
this.store.dispatch(ModalActions.leaveWithUnsavedChangesRequested());
return this.store.select(ModalSelectors.selection).pipe(
filter((selection) => !!selection),
map((selection) => selection === ModalButtonActionTypes.LEAVE_OK)
map((selection) => selection === ModalButtonActionTypes.LEAVE_OK),
);
})
}),
);
}
}
4 changes: 2 additions & 2 deletions src/app/guards/unsaved-event.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export class UnsavedEventGuard {
this.store.dispatch(ModalActions.leaveWithUnsavedChangesRequested());
return this.store.select(ModalSelectors.selection).pipe(
filter((selection) => !!selection),
map((selection) => selection === ModalButtonActionTypes.LEAVE_OK)
map((selection) => selection === ModalButtonActionTypes.LEAVE_OK),
);
})
}),
);
}
}
Loading

0 comments on commit 7347b38

Please sign in to comment.