diff --git a/src/client/.eslintrc.json b/src/client/.eslintrc.json index eb6b961..f9abd33 100644 --- a/src/client/.eslintrc.json +++ b/src/client/.eslintrc.json @@ -3,8 +3,10 @@ "parserOptions": { "project": "./tsconfig.json" }, + "plugins": ["ng-module-sort"], "rules": { "@angular-eslint/prefer-on-push-component-change-detection": "error", - "no-console": "error" + "no-console": "error", + "ng-module-sort/decorator-array-items": "error" } } diff --git a/src/client/package.json b/src/client/package.json index 6161eaf..376b377 100644 --- a/src/client/package.json +++ b/src/client/package.json @@ -74,6 +74,7 @@ "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.29.1", + "eslint-plugin-ng-module-sort": "^1.3.1", "eslint-plugin-unused-imports": "^3.0.0", "http-server": "^14.1.1", "jest": "^29.7.0", diff --git a/src/client/pnpm-lock.yaml b/src/client/pnpm-lock.yaml index 6be4ced..55d036b 100644 --- a/src/client/pnpm-lock.yaml +++ b/src/client/pnpm-lock.yaml @@ -162,6 +162,9 @@ importers: eslint-plugin-import: specifier: ^2.29.1 version: 2.29.1(@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) + eslint-plugin-ng-module-sort: + specifier: ^1.3.1 + version: 1.3.1(eslint@8.57.0) eslint-plugin-unused-imports: specifier: ^3.0.0 version: 3.2.0(@typescript-eslint/eslint-plugin@7.12.0(@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) @@ -3466,6 +3469,12 @@ packages: '@typescript-eslint/parser': optional: true + eslint-plugin-ng-module-sort@1.3.1: + resolution: {integrity: sha512-WZvqo2kff7sh/XxYZu/tphiXC7P24mMhkUy4keEqB0xBjXnw6/IF6/IV5GmFhGoZ3MN8jfqSOjEb7tPw7Rjzdw==} + engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} + peerDependencies: + eslint: '>=7' + eslint-plugin-unused-imports@3.2.0: resolution: {integrity: sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5340,6 +5349,10 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} + requireindex@1.2.0: + resolution: {integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==} + engines: {node: '>=0.10.5'} + requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -10046,6 +10059,11 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-plugin-ng-module-sort@1.3.1(eslint@8.57.0): + dependencies: + eslint: 8.57.0 + requireindex: 1.2.0 + eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.12.0(@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0): dependencies: eslint: 8.57.0 @@ -12255,6 +12273,8 @@ snapshots: require-from-string@2.0.2: {} + requireindex@1.2.0: {} + requires-port@1.0.0: {} resolve-cwd@3.0.0: diff --git a/src/client/src/app/components/app/app.component.ts b/src/client/src/app/components/app/app.component.ts index 05a71bc..dd01e6d 100644 --- a/src/client/src/app/components/app/app.component.ts +++ b/src/client/src/app/components/app/app.component.ts @@ -17,12 +17,12 @@ import { WebPushService } from '../../services/web-push.service'; selector: 'app-root', standalone: true, imports: [ - ConfirmDialogModule, CommonModule, + ConfirmDialogModule, FooterComponent, - RouterOutlet, MenuComponent, NotificationPromptDialogComponent, + RouterOutlet, ToastModule, ], providers: [ConfirmationService, MessageService], diff --git a/src/client/src/app/components/app/menu/menu.component.ts b/src/client/src/app/components/app/menu/menu.component.ts index c3a433b..fbfee57 100644 --- a/src/client/src/app/components/app/menu/menu.component.ts +++ b/src/client/src/app/components/app/menu/menu.component.ts @@ -22,10 +22,10 @@ import { chainSignals } from '../../../utils/signal.utils'; imports: [ ButtonModule, CommonModule, - MenubarModule, MenuModule, - TooltipModule, + MenubarModule, OverlayPanelModule, + TooltipModule, ], templateUrl: './menu.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/client/src/app/components/events/event-details/event-details.component.ts b/src/client/src/app/components/events/event-details/event-details.component.ts index 5f5a571..713df60 100644 --- a/src/client/src/app/components/events/event-details/event-details.component.ts +++ b/src/client/src/app/components/events/event-details/event-details.component.ts @@ -42,8 +42,8 @@ import { EventTimeslotDialogComponent } from '../event-timeslot-dialog/event-tim ButtonModule, CardModule, CommonModule, - EventTimeslotDialogComponent, EventFormComponent, + EventTimeslotDialogComponent, InterpolatePipe, MessagesModule, ProgressSpinnerModule, diff --git a/src/client/src/app/components/events/event-timeslot-dialog/event-timeslot-dialog.component.ts b/src/client/src/app/components/events/event-timeslot-dialog/event-timeslot-dialog.component.ts index 6384a60..daf5736 100644 --- a/src/client/src/app/components/events/event-timeslot-dialog/event-timeslot-dialog.component.ts +++ b/src/client/src/app/components/events/event-timeslot-dialog/event-timeslot-dialog.component.ts @@ -42,14 +42,14 @@ import { hasTouchScreen } from '../../../utils/user-agent.utils'; selector: 'app-event-timeslot-dialog', standalone: true, imports: [ - DialogModule, - CalendarModule, ButtonModule, + CalendarModule, + DialogModule, DropdownModule, + ErrorTextDirective, InputSwitchModule, MessagesModule, ReactiveFormsModule, - ErrorTextDirective, ], templateUrl: './event-timeslot-dialog.component.html', styleUrl: './event-timeslot-dialog.component.scss', diff --git a/src/client/src/app/components/events/events.component.ts b/src/client/src/app/components/events/events.component.ts index 0cba4b5..555378a 100644 --- a/src/client/src/app/components/events/events.component.ts +++ b/src/client/src/app/components/events/events.component.ts @@ -34,8 +34,8 @@ import { selectSignal } from '../../utils/ngrx.utils'; MenuModule, MessagesModule, ProgressSpinnerModule, - RouterLink, RippleModule, + RouterLink, TooltipModule, ], templateUrl: './events.component.html', diff --git a/src/client/src/app/components/login/login.component.ts b/src/client/src/app/components/login/login.component.ts index bf39021..80f1061 100644 --- a/src/client/src/app/components/login/login.component.ts +++ b/src/client/src/app/components/login/login.component.ts @@ -33,12 +33,12 @@ import { TranslateService } from '../../services/translate.service'; CardModule, CommonModule, ErrorTextDirective, - OnEnterDirective, - ReactiveFormsModule, - ProgressSpinnerModule, InputTextModule, InterpolatePipe, + OnEnterDirective, PasswordModule, + ProgressSpinnerModule, + ReactiveFormsModule, TooltipModule, ], templateUrl: './login.component.html', diff --git a/src/client/src/app/components/maps/maps.component.ts b/src/client/src/app/components/maps/maps.component.ts index 776d29d..18c45fb 100644 --- a/src/client/src/app/components/maps/maps.component.ts +++ b/src/client/src/app/components/maps/maps.component.ts @@ -36,9 +36,9 @@ function mapMatchesFilter( CommonModule, FormsModule, InputTextModule, - MessagesModule, MapDialogComponent, MapItemComponent, + MessagesModule, ProgressSpinnerModule, ], templateUrl: './maps.component.html', diff --git a/src/client/src/app/components/player-events/player-event-details/player-event-details.component.ts b/src/client/src/app/components/player-events/player-event-details/player-event-details.component.ts index 494f25c..77ee2fb 100644 --- a/src/client/src/app/components/player-events/player-event-details/player-event-details.component.ts +++ b/src/client/src/app/components/player-events/player-event-details/player-event-details.component.ts @@ -49,19 +49,19 @@ const gameDuration = 90 * 60 * 1000; selector: 'app-player-event-details', standalone: true, imports: [ - CommonModule, ButtonModule, CardModule, + CommonModule, DropdownModule, FadingMessageComponent, FormsModule, - ProgressSpinnerModule, + InputSwitchModule, + MessagesModule, OverlayPanelModule, + ProgressSpinnerModule, + ResetNgModelDirective, RouterLink, TooltipModule, - MessagesModule, - InputSwitchModule, - ResetNgModelDirective, ], templateUrl: './player-event-details.component.html', styleUrl: './player-event-details.component.scss', diff --git a/src/client/src/app/components/player-events/player-events.component.ts b/src/client/src/app/components/player-events/player-events.component.ts index a634963..c1fd782 100644 --- a/src/client/src/app/components/player-events/player-events.component.ts +++ b/src/client/src/app/components/player-events/player-events.component.ts @@ -21,7 +21,7 @@ const dayMillis = 24 * 60 * 60 * 1000; @Component({ selector: 'app-player-events', standalone: true, - imports: [CommonModule, ProgressSpinnerModule, RouterLink, InterpolatePipe, MessagesModule], + imports: [CommonModule, InterpolatePipe, MessagesModule, ProgressSpinnerModule, RouterLink], templateUrl: './player-events.component.html', styleUrl: './player-events.component.scss', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/client/src/app/components/user-settings/user-settings.component.ts b/src/client/src/app/components/user-settings/user-settings.component.ts index d129e13..d2dc874 100644 --- a/src/client/src/app/components/user-settings/user-settings.component.ts +++ b/src/client/src/app/components/user-settings/user-settings.component.ts @@ -56,8 +56,8 @@ type NotifyTimeslotStartOption = { CardModule, CommonModule, DropdownModule, - FormsModule, FloatLabelModule, + FormsModule, InputSwitchModule, MessagesModule, ProgressSpinnerModule, diff --git a/src/client/src/app/components/users/user-dialog/user-dialog.component.ts b/src/client/src/app/components/users/user-dialog/user-dialog.component.ts index 53ada31..6f95398 100644 --- a/src/client/src/app/components/users/user-dialog/user-dialog.component.ts +++ b/src/client/src/app/components/users/user-dialog/user-dialog.component.ts @@ -56,10 +56,10 @@ import { UserItemComponent } from '../user-item/user-item.component'; InputTextModule, InterpolatePipe, ListboxModule, - OverlayPanelModule, MessagesModule, - UserItemComponent, + OverlayPanelModule, ReactiveFormsModule, + UserItemComponent, ], templateUrl: './user-dialog.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/client/src/app/components/users/users.component.ts b/src/client/src/app/components/users/users.component.ts index 01a2260..6b97b03 100644 --- a/src/client/src/app/components/users/users.component.ts +++ b/src/client/src/app/components/users/users.component.ts @@ -37,10 +37,10 @@ function userMatchesFilter(map: User | undefined, lowerCaseFilter: string): map FormsModule, InputTextModule, MessagesModule, + ProgressSpinnerModule, UserDialogComponent, - UserPushDialogComponent, UserItemComponent, - ProgressSpinnerModule, + UserPushDialogComponent, ], templateUrl: './users.component.html', styleUrl: './users.component.scss',